T
Tony
Everytime I try to call UpdateBatchSize, I get an exception "Specified
method not supported" I'm using a strongly typed data set, and so far I
have not been able to find anything on this error. If I leave out the
UpdateBatchSize then everything works fine.
My code is:
string strConnectionString = "Dsn=MyDsn;app=Microsoft® Visual Studio®
2005;wsid=";
OdbcDataAdapter myDataAdapter = null;
OdbcConnection mySqlConnection = new
OdbcConnection(strConnectionString);
mySqlConnection.ConnectionTimeout = 60;
OdbcCommand myCommand = new OdbcCommand(strSql, mySqlConnection);
try
{
myDataAdapter = new OdbcDataAdapter(myCommand);
OdbcCommandBuilder myOdbcCommandBuilder = new
OdbcCommandBuilder(myDataAdapter);
// need to figure out how to get this to work
myDataAdapter.UpdateBatchSize = 1000; // This line throws an
exception
myDataAdapter.Update(dsWork, strTable);
}
catch (Exception exc)
{
strErr = exc.Message;
}
Thanks.
method not supported" I'm using a strongly typed data set, and so far I
have not been able to find anything on this error. If I leave out the
UpdateBatchSize then everything works fine.
My code is:
string strConnectionString = "Dsn=MyDsn;app=Microsoft® Visual Studio®
2005;wsid=";
OdbcDataAdapter myDataAdapter = null;
OdbcConnection mySqlConnection = new
OdbcConnection(strConnectionString);
mySqlConnection.ConnectionTimeout = 60;
OdbcCommand myCommand = new OdbcCommand(strSql, mySqlConnection);
try
{
myDataAdapter = new OdbcDataAdapter(myCommand);
OdbcCommandBuilder myOdbcCommandBuilder = new
OdbcCommandBuilder(myDataAdapter);
// need to figure out how to get this to work
myDataAdapter.UpdateBatchSize = 1000; // This line throws an
exception
myDataAdapter.Update(dsWork, strTable);
}
catch (Exception exc)
{
strErr = exc.Message;
}
Thanks.