Grig,
Sometimes you need to do an .EndEdit() or an .EndCurrentEdit(). If you put this code:
this.BindingContext[dsBook].EndCurrentEdit();
before you save, you should see that dsBook.HasChanges() should now be true.
~~Bonnie
>Ok, here's the deal:
>
>A winform containing several textboxes. The textboxes are bound to a dataset through code like this:
>
>txtBookTitle.DataBindings.Add(new Binding("Text", dsBook, dsBook.Tables[0].ToString() + ".Title"));
>
>
>I change the textbox's contents, then in Save button I have the following:
>
>SqlCommandBuilder cmdBuilder = new SqlCommandBuilder(BookDataAdapter);
>BookDataAdapter.UpdateCommand = cmdBuilder.GetUpdateCommand;
>BookDataAdapter.Update(dsBook, "Books");
>
>
>However, nothing happens. dsBook.HasChanges() returns false. Why? What I am missing and where to get this info from? I tried MSDN, but the examples I've found just say DbAdapter.Update(). Well.... i did that and it doesn't update. I have looked into UpdateCommand text, it looks ok. So it has to be something else. What?
>
>Thank you.