Here's the code: CString CMyDB::GetDefaultConnect() { return _T("DBQ=C:\\CookIt\\Program\\DataBases\\DB\\CookIt.mdb;DefaultDir=C:\\CookIt\\Program\\DataBases\\DB;Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\\CookIt\\Program\\DataBases\\DB\\CookIt.mdb.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;"); } CString CMyDB::GetDefaultSQL() { return _T("[ApeData],[BreadData],[CakeData],[CandyData],[CookieData],[DrinkData],[FruitData],[MeatData],[PastryData],[PieData],[PudData],[Recipe],[SaladData],[SauceData],[SelRecipe],[SoupData],[Special2Pg1],[Special2Pg2],[Special2Pg3],[Special2Pg4],[Special2Pg5],[Special2Pg7],[SpecialPg1],[SpecialPg2],[SpecialPg3],[SpecialPg4],[SpecialPg5],[SpecialPg6],[SpecialPg7],[VegData]"); } Here's some more code: void CCookItDBView::OnInitialUpdate() { m_pSet = &GetDocument()->m_CookItDBSet; m_pSet->Open(CRecordset::dynaset,0,CRecordset::none ); BOOL B = m_pSet->CanAppend(); BOOL e = m_pSet->CanUpdate(); } Yes I am using DSN and no I don't use a CDatabase object(because I don't know how) I don't know whaqt to put in the Cdatabase.Open(...,...,...) statement. I checked carefully when I did the "add class" and OBDC dialog and the "Read Only" box was left unselected as was the "Execute" box
A C++ programming language novice, but striving to learn