Insert works, update doesn't.
Please take 2 minutes and try this? I have tried asking this question
before, and I'm stumped and frustrated, and I have years of VB
experience back to version 5.
Create a dataset using the VS 2005 designer, get all the tables from
whatever database.
Create a windows app and drag a table from the database to the windows
form, creating a datagridview. This creates a bindingnavigator and
datagridview on the form. Run the program. Change a cell somewhere in
the datagridview, click the save button on the binding navigator.
Boom: "Update requires a valid UpdateCommand."
I have gone back to the dataset in the designer and using configure
told it to generate the update command etc. No avail. No difference.
What do I have to do to get an update working on this datagridview?
What am I doing wrong to mess it up?
I've tried to change my table adapter update command text, but no such
thing even exists.
What book or website will show me how to use this thing correctly?
THANK YOU THANK YOU THANK YOU in advance for any help that might get
this working...
David
Alcibiade - 17 Sep 2006 14:09 GMT
Hi, in my code I've
Private Sub AziendeBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AziendeBindingNavigatorSaveItem.Click
Me.Validate()
Me.AziendeBindingSource.EndEdit()
Me.AziendeTableAdapter.Update(Me.Db1DataSet.aziende)
You can find some example in:
http://download.microsoft.com/download/c/2/3/c2318968-80aa-43de-a755-9c0763a2dca
8/VB101SamplesAll.msi
and install also Teacher starter kit
Good luck
kb5ylg@gmail.com ha scritto:
> Insert works, update doesn't.
>
[quoted text clipped - 29 lines]
>
> David