1 Replies - 6228 Views - Last Post: 15 February 2012 - 10:13 AM Rate Topic: -----

#1 konstantin79  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-February 12

C# Custom form to add, read and delete data in local database

Posted 15 February 2012 - 10:04 AM

Hello everyone,

I am a beginner to C# programming and I want to do a custom form for my local database to add edit and delete records. Now I can do all of that with drag and drop but the problems are errors. How can I add exceptions to errors for example if I click the add button the solution breaks and I got the message "No Null Allowed Exception was unhalded". What should I do to fix this problem?

Please help.
Best regards,

Is This A Good Question/Topic? 0
  • +

Replies To: C# Custom form to add, read and delete data in local database

#2 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6528
  • View blog
  • Posts: 14,439
  • Joined: 02-June 10

Re: C# Custom form to add, read and delete data in local database

Posted 15 February 2012 - 10:12 AM

See FAQ 21 for database tutorials.

TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Form1 talk to Form2

FAQ (Frequently Asked Questions - Updated Feb 2012[HR]

But when it comes to the larger issue of "How to I handle exceptions?" and "I'm new to C# but I want to write a program from scratch anyway"...

I will make a common suggestion: Quit trying to develop your own application before you lean *how* to code in your chosen language. Trying to write a program from scratch as a learning exercise never works this early in your schooling.

This type of thing is covered very early on in any self-teaching book. Which makes me think you really aren't ready to be designing an application yet.

Some of the tutorials below are for C# not C, C++, VB.NET [...]. But the conceptual stuff of classes, object oriented design, events etc. are not language specific and should give you enough guidance in theory of program development for you to be able to look-up specific code example in your chosen coding language.

Newbie/Rookie said:

I have a little programming experience but I need to write ...

You need to start there. I can't say "I have little experience in speaking Russian, but I have been assigned to write a mystery novel in Russian. Can you help me?"

We can help you by saying "First learn basic programming and the language of C#. Then take on assignments." Could someone here write this program for you? Sure. Could someone here map out all the processes you need to follow and do the Software Design part of this in the slim hope you could code it from there? Sure. But we don't volunteer to do the job that you're either getting paid for, or getting a grade for. You may want to read this.

For now, just work on the lessons. Do a self-teaching book from cover to cover. Then consider writing a program.

Don't try to create a useful working program to fit a need of yours (or a for-pay contract) as your introduction to coding project. When you are learning to code you don't know enough to code a program, let alone know how to engineer the architecture of a program. It would be like saying "I don't know how to read sheet music, or play an instrument. I think I'll write a 3 act opera as my first learning experience."

I don't say this to be mean. We've seen lots of new coders take this approach and we know it doesn't work. Trying to design your own programs before you understand the basics of the code language you've chosen just leads to problems, frustrations, and 'swiss-cheese' education (lots of holes).

Resources, references and suggestions for new programmers. - Updated Jan 2012

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1