"Commander Ace" <Co**********@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi, I'm having some problems with updating an SQL Database with modified
fields from a datatable. I got the code from a Wrox book, 'Professional
VB.NET 2003', the same code can be found here:
http://media.wiley.com/product_ancil...2_23_24_25.zip
\Chapter 16\AuthorEditor
Basically when I have made a change and save it, close and reopen the
program the changes that I made have gone, and it's the original data
again.
Could someone please help as I am at the end of my tether with this one!!
Cheers
I opened your zip file and there's a shed load of stuff in there.
Far more than I'm willing to sift through.
Posting just the little bit of code you thought did the update might have
meant I could give specific help.
Assuming you have the grid, a dataadaptor and a dataset.
You apply changes using one line of code.
This is something of the form:
yourdataadaptor.Update(yourdataset)
Up until you do that, any changes are just going into a locally cached
version of the data.
That's why them datasets are referred to as being disconnected.
You read em in by filling the dataset, the user fiddles with em, you write
em back using the update method.
If you got something like that line in your code then check to see you have
some sort of sql statement the dataadaptor can apply on updating.
When you generate a dataset you can check boxes to generate the select,
update delete and whatnot. If you didn't choose the update then I'm not
sure what happens, but it ain't going to get updated.
--
Regards,
Andy O'Neill