Too many client tasks

A

Andy Ogden

I am writing a site that uses an ODBC link to a database, the code
below is used to retrieve data from this database. I have had reports
of the following error.

ERROR [08004] [Microsoft][ODBC Microsoft Access Driver] Too many
client tasks. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed

I have included the code in question below, as you can see it takes in
a string containing an SQL statement. The returned data is then
returned within a DataView object. No other code in the site accesses
the database, so the problem must be in this code.


Can anyone help, I'm stuck



private DataView GetDataView(string szSQL)
{
string szConnection= "DSN=tif";
DataSet objDataSet= new DataSet();
OdbcConnection objDBConn = new OdbcConnection(szConnection);
OdbcDataAdapter objDataAdapter = new OdbcDataAdapter();
objDataAdapter.SelectCommand = new OdbcCommand(szSQL, objDBConn);
objDataAdapter.Fill(objDataSet);
DataView objDataView= objDataSet.Tables[0].DefaultView;

objDBConn.Close();

return objDataView;
}
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top