Problems Querying on Boolean Columns?

Gladimir

Well-known member
Joined
Mar 29, 2003
Messages
60
Location
San Diego, CA
When I try to fill a dataset table using the SELECT statement listed below, I get the following error:

Code:
Unspecified error: E_FAIL(0x80004005)

Here is the relevant code:

C#:
string strSelectA = null;
strSelectA = "SELECT ComputerName, Domain FROM REF_CSDComputers " +
   "WHERE (Billable=" + true.ToString() + ")";
OleDbDataAdapter assetAdapter = new OleDbDataAdapter(strSelectA, master);

try
{
   assetAdapter.Fill(ds1, "lookup");
}
finally
{
   master.Close();
}

Obviously, the error occurs when I attempt to use the Fill method of the assetAdapter.

The dataset ds1 definitely exists, and in fact, there is a line of code calling the Fill method of another DataAdapter just above the assetAdapter.

Any help is greatly appreciated.
 
in fact, there is a line of code calling the Fill method of another DataAdapter just above the assetAdapter.

If the line above is coded the same way, then youre passing a Closed connection to the second DataAdapter. The Finally code always runs, which is probably closing the Connection after the first use.

-nerseus
 
Database Connection is OK...

I double-checked on your suggestion. The Fill method checks the status of the related connection object and automatically Opens that object if it is closed.

Ive also tried playing with the "Billabe=" portion of the SELECT statement, including using Yes, True, and 1.

Thanks for the feedback.
 
Back
Top