F
FST
Hello all,
After I've used the OleDbDataAdapter to fill a datagrid from the Form1_Load
event then I run the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
OleDbDataAdapter1.Update(DataSet11)
MessageBox.Show("Database updated")
End Sub
The database gets updated as it should, but if I run the
OleDbDataAdapter1.Update(DataSet11) from inside the
DataGrid1_CurrentCellChanged event the database doesn't update:
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.CurrentCellChanged
OleDbDataAdapter1.Update(DataSet11)
MessageBox.Show("DataGrid1_CurrentCellChanged")
End Sub
Does anyone know, why the database updates from inside the Button1_Click
event, but won't
update from inside the DataGrid1_CurrentCellChanged event?
Thanks,
Fred
After I've used the OleDbDataAdapter to fill a datagrid from the Form1_Load
event then I run the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
OleDbDataAdapter1.Update(DataSet11)
MessageBox.Show("Database updated")
End Sub
The database gets updated as it should, but if I run the
OleDbDataAdapter1.Update(DataSet11) from inside the
DataGrid1_CurrentCellChanged event the database doesn't update:
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.CurrentCellChanged
OleDbDataAdapter1.Update(DataSet11)
MessageBox.Show("DataGrid1_CurrentCellChanged")
End Sub
Does anyone know, why the database updates from inside the Button1_Click
event, but won't
update from inside the DataGrid1_CurrentCellChanged event?
Thanks,
Fred