You might want to show us the code for the various command properties for
the DataAdapter.
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105 [quoted text, click to view] "B" <B@discussions.microsoft.com> wrote in message
news:E5BDC0B5-9E73-4795-94FA-DFB67CAD7CB2@microsoft.com...
> Hi,
>
> I'm unable to get a dataset to update the database properly on a call to
> "update". I have a simple form with a bunch of text fields bound to fields
> in
> a table called "settings" . It loads and fills correctly, and when I make
> edits to the bound text fields the changes are reflected immediately in
> the
> dataset.
>
> However, whenever I called the Update method on the data adapter. nothing
> happens! The Update SQL looks OK (it's basically UPDATE settings SET col1
> =
> ?, ...."; it it correct that the parameter values are bound dynamically on
> the Update call?
>
> Manually selecting values out of the dataset does reflect edits to the
> text
> fields, but running the Update command does NOT update the database. So,
> if
> text field has a value "joe" and is bound to a db field "name" via a
> dataset,
> the dataset has the correct value, but the database itself is not
> updating.
>
> However, if I manually create a new Command object for updating the
> database
> with a custom SQL statement and have it bind to the data adapter as the
> update command and then call Update, it does work...but this is a huge
> pain
> since the whole point of using controls bound to database fields is to not
> have to do this.
>
> What am I doing wrong? It would be really convenient if the Update method
> worked as advertised. :)
>
> thanks!
>