mjb3030 Posted June 14, 2004 Posted June 14, 2004 I have a DataAdapter/DataSet/DataGrid application I created using the database wizard. The problem is that if I make a change to a cell in the datagrid and then close the application without moving the focus to another record, the database doesn't get changed. If I move the focus to another record first, everything is OK. How do I force it to update? I am currently doing this when the application is closed: Private Sub UpdateDB() daWheelLog.Update(dsWheelLog) End Sub The DataGrid is called dgrWheelLog. I tried this: dsWheelLog.AcceptChanges() I put that before the daWheelLog.Update line, but that didn't work. What do I need to do? Quote
mjb3030 Posted June 14, 2004 Author Posted June 14, 2004 I found a workaround for this problem. In my form_close event, I set the DataSource property of my datagrid to nothing. That forces the changes into the dataset. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.