Dataset updates but actual database doesn't

Pitt

New member
Joined
May 11, 2008
Messages
2
Programming Experience
Beginner
Hi guys,

I'm new here this is my first post
i'm having some problems with an application I am making for a pastor
he has to use to app for inserting info about people that baptize and so on till marriage

The dataset does contain the info when inserting a new or updating the data but when it comes to updating the real database it gives me an error.
the only time it does update the database it when all the dates are filled in there are 5 datetime pickers and not all should be filled in from the begin but if you don't then it gives a strange error about "datatype mismatch or something
but when all th 5 datetime are inserted with a value it does it fine

Is there anyone that had a similar problem or so? or can anyone help me with this.. here is a file with the database and the vb.net folder with the files in it and a notepad with the code in it..
 

Attachments

  • Pastoor1.zip
    106.8 KB · Views: 14
A dataset is an OFFLINE copy of the database. Therefore you must commit the changes from the dataset in order for them to be saved. I believe you need a data adapter for this. I try to avoid using datasets whenever possible because of the performance issues they cause. I use a SQLDataReader and SQLDataCommand when working with databases. This allows me to create stored procs on the SQL server and not needing to make code changes when the DB logic changes and run commands as fast as possible.
 
The thing is that my teacher gave us a small project we had to do to pass the class and I did it almost the same so the code I used for the other thing I copy pasted and changed it with my things
I is suppose to work but it doesn't the dataset loads and I can browse through the records so I think the dataset is working but updating it gives me a headache
 
Back
Top