Hi
Did you mean writing data back into the database? If so, there are two ways to achieve this.
First, if the tbl_Work table has a primary key or a unique column, you can use a CommanderBuilder object to auto-generate the InsertCommand, UpdateCommand, and DeleteCommand for the DataAdapter. Check this page for a sample.
Second, you can create your own InsertCommand, UpdateCommand, and DeleteCommand for the DataAdapter. Try something like the following:
Code Block
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
da.DeleteCommand = New OleDbCommand("delete ...", conn)
da.InsertCommand = New OleDbCommand("insert ...", conn)
da.DeleteCommand = New OleDbCommand("update ...", conn)
You need to call Update method for the DataAdapter when you want to write back to the database.
Hope this helps.
Best regards.
Rong-Chun Zhang