Posted on 2001-08-02
I get some value from database with ADO:
hr = pConn->Open("dsn=MySource;uid=sa;pwd=", "", "", adAsyncConnect);
pRs = pConn->Execute("select min(myID) from MyTable",
vtIndex.vt = VT_I2;
vtIndex.iVal = 0;
vtField = pRs->Fields->GetItem(vtIndex)->Value;
if(vtField.vt != VT_NULL);
TRACE("VALUE = %d\n", vtField.iVal);
when I open connection with adAsyncConnect, pConn->Execute will throw an error. With adConnectUnspecified will work OK, but speed is very slow, more slow than ODBC.
My question is why I can?t use Execute() with asynchronously opening connection?
Or Which is the max speed method to get value from database?