I am hitting an Oracle database using C# and OleDb, I have sucessfully pulled data from a query but I am unable to update the database using OleDbAdapter.Update()
, my update code is below. ("Adapter" is a reference to the OleDbAdapter
object used to sucessfully pull data out of the database.)
OleDbCommandBuilder builder = new OleDbCommandBuilder(Adapter);
Adapter.UpdateCommand = builder.GetUpdateCommand();
Adapter.UpdateCommand.Prepare();
Adapter.Update(ds);
ds.AcceptChanges();
I am currently getting a "Command was not prepared." error on the first line of the above code. Any suggestions and I would be very grateful.
(Edit: ds is the DataSet)