c++ - ADO Recordset object returning 80004003 Error -
i trying open recordset, returning me error..
here part of code:
void myfunction(_connectionptr connptr) { _recordsetptr recptr; std::string command = "select * mytable"; recptr.createinstance(__uuidof(_recordset)); recptr->open(command.c_str(), connptr.getinterfaceptr(), adopenstatic, adlockoptimistic, adcmdtext); //error!!!!!!! } int main(int argc, char** argv) { coinitializeex(null, coinit_multithreaded) _connectionptr connptr; connptr.createinstance("adodb.connection"); connptr->open(....my connection string, userid, , password....); myfunction(connptr); ::couninitialize(); connptr->close(); }
the error message:
code = 80004003 code meaning = source = <null> description = <null> dd
(the description says nothing.. , have no idea "i" means or why "dd" printed out @ end,,)
there nothing wrong connection string, userid, , password, since opening connection ptr returns no error. error occurs when try open recordset.. can find problem in code?
thanks
Comments
Post a Comment