Hello,
I have written code to fill a DataSet using the OleDbDataAdapter. I have
written and tested this code on Windows XP Professional, but the same code
will not work at all running on a computer installed with Win2k SP4.
I have posted a snippet below, and I have placed MessageBox.Show statements
in my code to trace the problem to calling the Fill method on the DataSet.
An OdbcException does not get thrown but instead it looks like something
that was thrown by the framework itself.
I wrote this using VS.NET 2003 and I installed the .NET 1.1 Redistributable
on the computer in question.
Thanks for any help you can provide.
Will
Code:
OleDbConnection conn = KeyMasterMainWindow.GetConnection();
OleDbCommand cmd = conn.CreateCommand();
if(tablename.CompareTo("Company") == 0)
{
cmd.CommandText = strCompanySelect; // = SELECT * FROM Company
companyAdapter = new OleDbDataAdapter(cmd);
companyAdapter.RowUpdated += new
OleDbRowUpdatedEventHandler(Adapter_OnRowUpdate);
companyBuilder = new OleDbCommandBuilder(companyAdapter);
companyAdapter.Fill(ds, "Company"); // Blow up here
adapterTable.Add("Company", companyAdapter);
}
--
__________________________________________________ ___
Today's science fiction is tomorrow's science reality.
Never question the eccentricity of man or the plausibility
of the human spirit.
- William Lee Mapp, III, Dreamer
William Lee Mapp, III
Co-Founder
Managing Officer, BA Systems, LLC
mapp (AT) basystemsllc (DOT) com
http://www.basystemsllc.com
Less Theory, More Reality