Hello
I suspect that this is a simple error on my part but this example may help others starting out with ADO.NET.
I'm working on a very basic Database Application. I've included the full project as an attachment in this post.
Its a very basic Form that is the front end for a database containing contact information.
The form has many fields but I've only implemented the first 4 for simplicity.
The form has 4 buttons
1-Find = user enters record ID to bring up the contact information for that record (SQL Select used)
2-New = user can create a new record (SQL Insert used)
3-Save = user saves current record (updated or new- SQL Update or insert used)
4-Delete = Record deleted
I have used an access DB for simplicity but will need to use MySql or MS SQL for end project. Amen.mdb is included with project.
Parts That Work
1-Find Works OK
2-New Works OK until Save
Parts that Don't work
3 - Save -
Insert only inserts the first 2 fields in the database! ie name & contact, phone & mobile don't get inserted! -
I don't understand this as the code seems OK
Update doesn't work at all - it causes an unhandled exception in the cmdUpdate part of my code.
The project was written in VS.NET 2003
Any Help greatly appreciated
Tino
zipped up project
www.itsthere2share.com/Amen2.zip