G
Guest
I am having problems getting records to save to a DataTable and was hoping
maybe someone out there could help. I am using a DataTable that is bound to
a data entry form. Basically, here is how it flows....
1.) DataTable has several records in it.
2.) User pushes a button to signal that they are done with the current
record (and therefore dont want to see it anymore) and a flag is inserted in
the record to indicate this.
3.) I want to commit all the current records in the DataTable to the
database and requery the database so that it brings up a fresh datatable
(minus the record the user just said they were done with).
This is the code I am using
'Trying to commit the changes to the database
DataAdapter.Update(DataTable)
DataTable.AcceptChanges()
'Clear the current DataTable
DataTable.Clear
'Requery Database
cmd.CommandText = MySqlStatement
DataAdapter= New AdoceDataAdapter(cmd)
DataAdapter.Fill(DataTable)
But when I do this, I dont get any records to return because the never got
wrote to the database? Any suggestions?
Thanks!
Mike
maybe someone out there could help. I am using a DataTable that is bound to
a data entry form. Basically, here is how it flows....
1.) DataTable has several records in it.
2.) User pushes a button to signal that they are done with the current
record (and therefore dont want to see it anymore) and a flag is inserted in
the record to indicate this.
3.) I want to commit all the current records in the DataTable to the
database and requery the database so that it brings up a fresh datatable
(minus the record the user just said they were done with).
This is the code I am using
'Trying to commit the changes to the database
DataAdapter.Update(DataTable)
DataTable.AcceptChanges()
'Clear the current DataTable
DataTable.Clear
'Requery Database
cmd.CommandText = MySqlStatement
DataAdapter= New AdoceDataAdapter(cmd)
DataAdapter.Fill(DataTable)
But when I do this, I dont get any records to return because the never got
wrote to the database? Any suggestions?
Thanks!
Mike