N
Nevyn Twyll
I've got several datatables in a dataset that I've filled programattically.
The structure of the datatables match the structure of tables in an access
database.
What is an easy, programmatic way to insert all those datatable records into
the tables in Access without manually generating parameterized
InsertCommands for an OleDBDataAdapter?
I tried the following using an OleDbCommandBuilder to try and build the
InsertCOmmand,, and it generated an error "Microsoft JET Database Engine:
Operation must use an updateable query."
Dictionary.ECMDBDataset.MyDataTable dtMyTable;
OleDbConnection odbConn;
<...>
OleDbDataAdapter odbadapt = new OleDbDataAdapter();
odbadapt.SelectCommand = new OleDbCommand("SELECT Myfield1, Myfield2 From
[MyDataTable];", odbConn );
OleDbCommandBuilder cb = new OleDbCommandBuilder(odbadapt);
odbadapt.InsertCommand = cb.GetInsertCommand();
odbadapt.Update(dtTableList);
Help?
The structure of the datatables match the structure of tables in an access
database.
What is an easy, programmatic way to insert all those datatable records into
the tables in Access without manually generating parameterized
InsertCommands for an OleDBDataAdapter?
I tried the following using an OleDbCommandBuilder to try and build the
InsertCOmmand,, and it generated an error "Microsoft JET Database Engine:
Operation must use an updateable query."
Dictionary.ECMDBDataset.MyDataTable dtMyTable;
OleDbConnection odbConn;
<...>
OleDbDataAdapter odbadapt = new OleDbDataAdapter();
odbadapt.SelectCommand = new OleDbCommand("SELECT Myfield1, Myfield2 From
[MyDataTable];", odbConn );
OleDbCommandBuilder cb = new OleDbCommandBuilder(odbadapt);
odbadapt.InsertCommand = cb.GetInsertCommand();
odbadapt.Update(dtTableList);
Help?