SqlDataAdapter Update Does not work

adwaitjoshi

Active member
Joined
Dec 29, 2005
Messages
38
Programming Experience
1-3
I have a datagrid in which the user can change any data. I also have a save button which when pressed I execute the following code

Dim cb As New SqlCommandBuilder(_sqladapter)
_sqladapter.UpdateCommand = cb.GetUpdateCommand
_sqladapter.Update(dataSet.Tables(_tablename))


When I move out from the changed cell sand call the above code then the dataset is updated however if i just hit ctrl + s on the existing (changed) cell then the save doesnt work. I also tried

Me.BindingContext(dataSet, "table1").EndCurrentEdit()

that does work either any leads?
 
Last edited:

TechGnome

Well-known member
Joined
May 23, 2005
Messages
896
Programming Experience
10+
So it DOES work... just not when you hit Ctrl+S... right?
Have you set up some properties to trap for the Ctrl+S keystroke? Unless there's property I don't know about, there isn't a direct way to say that Ctrl+S executes the Save button code.

-tg
 
Top Bottom