Specifically:
1.) GetTables() -from a recordset generated by adSchemaTables
getadoEOF() returnes DB_NOTABLE. Yet this code works in a basic test applet.Code:ADODB::_RecordsetPtr rsTables = NULL; rsTables.CreateInstance( __uuidof( ADODB::Recordset ) ); rsTables = m_pDBConnection->OpenSchema(ADODB::adSchemaTables); CString sObjectName; while (!rsTables->GetadoEOF()) { ..... }
2.) ProcedurePtr::Getcommand():
GetCommand() returnes with error "E_NOINTERFACE".Code:ADOX::ProceduresPtr procs = catalog->GetProcedures(); _variant_t idx; CString sProc; for( int i = 0; i < procs->GetCount(); i++) { idx = (short)i; proc = procs->GetItem(idx); sProc = (LPCTSTR)proc->GetName(); if( sProc.CompareNoCase(sProcName) != 0 ) continue; _variant_t var = proc->GetCommand(); sStoredProc = (char*)(_bstr_t)var; return true; }
Any ideas or examples would be much appreciated, I'm a bit stuck.


Reply With Quote