Thanks... One More...
Thanks, that worked!
Now I have another problem.
I am using OleDbCommandBuilder to automatically generate my update string when I do use the OleDbDataAdapter.Update method.
During my pass, I successfully add 7872 records to the asset table using the Adapter.Update with OleDbCommandBuilder. During a second pass, I load the existing 7872 records in DataSet ds1, add another 1846 new records to ds1, and attempt to update the source.
When I call the OleDbDataAdapter.Update method (still using OleDbCommandBuilder), I get a "string too long" error telling me I am trying to add too many records. I've included a very basic code snippet below:
// create dataset and populate with tables
DataSet ds1 = new DataSet();
ds1.Tables.Add("scsdComputer");
ds1.Tables.Add("asset");
// setup connection using my dbConnection class
dbConnection masterDb = new dbConnection();
OleDbConnection mdb = masterDb.m_mdb;
// create the adapter and command objects
OleDbDataAdapter scsdComputerAdapter = new OleDbDataAdapter(strscsdComputerSelect, mdb);
OleDbCommandBuilder scsdComputerCommand = new OleDbCommandBuilder(scsdComputerAdapter);
OleDbDataAdapter assetAdapter = new OleDbDataAdapter(strassetSelect, mdb);
OleDbCommandBuilder assetCommand = new OleDbCommandBuilder(assetAdapter);
// populate the tables in the dataset
scsdComputerAdapter.Fill(ds1, "scsdComputer");
assetAdapter.Fill(ds1, "asset");
try
{
// do a bunch of stuff then update source
scsdComputerAdapter.Update(ds1, "scsdComputer");
assetAdapter.Update(ds1.GetChanges(), "asset");
}
The error is generated by the scsdComputerAdapter.Update line. Any ideas would be greatly appreciated.