This code should help you to find the problem with the exception.
Code:try { CMyProjectClass rs(&myDatabase); rs.Open(CRecordset::snapshot,_T("Select proj_num, contact_name from dbo.ccy003_project")); while(!rs.EOF()) { cout << rs.m_strCustomerName << endl; rs.MoveNext(); } rs.Close(); } catch (CDBException* myexcept) { cout << myexcept->m_strError << endl; return 0; }




Reply With Quote