UpdateBatchSize Method not supported

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top