I am trying my best to get into VC++ coding. At the moment, am trying to create a data fetch application using CDatabase and CRecordset classes. I seem to be missing things there because I keep receiving a message that says that the m_nFields attribute has not been set to the correct value. Following is the extract.
CDatabase DB;
CRecordset Recordset(&DB);
m_nFields=1;
BOOL bRtn=DB.Open("FILE", FALSE, TRUE, "ODBC;", TRUE );
Recordset.Open(AFX_DB_USE_DEFAULT_TYPE,"select CC7013MENUID from CS7013MENU",none);
DB.ExecuteSQL(strSQL);
Could somebody kindly advise at the earliest please?
Regards
CDatabase DB;
CRecordset Recordset(&DB);
m_nFields=1;
BOOL bRtn=DB.Open("FILE", FALSE, TRUE, "ODBC;", TRUE );
Recordset.Open(AFX_DB_USE_DEFAULT_TYPE,"select CC7013MENUID from CS7013MENU",none);
DB.ExecuteSQL(strSQL);
Could somebody kindly advise at the earliest please?
Regards