Too many client tasks

  • Thread starter Thread starter Andy Ogden
  • Start date Start date
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;
}
 
Back
Top