VC++ - ODBC : can't reach the last records of my file.dbf
-
I used ODBC "dBase files" to access a file GSTAT.DBF, my code is the following : DBName = GlobalDSN + "Gstat;UID=;PWD:"; ErrMsg = ""; res = "SELECT DATUM,CASHT,MCASHT,NETROOM,MNETROOM from GSTAT WHERE (DATUM = #08/01/2004#)"; gDB.OpenEx(DBName,CDatabase::noOdbcDialog); TRY { rs.Open( CRecordset::forwardOnly, res ); NbRecord = rs.GetRecordCount(); } CATCH(CDBException, e) .... The problem is that it works perfecly on the 1061 first records, but it refuses to find me the records 1062-1068 (1068 being the last record in file)... and I wonder why ? I thought that it could be due to a problem with MSjet 4.0 dll because mine is quite "old" (as far as I can see, my version 4.0.4431.3 is from SP5. I downloaded the SP8 from MS, but when I was to install it, I receive a message from the installation program saying that my version is too old and that I should have at least the SP3 ... Once again, I don't know why Any idea on 1st or 2nd of my problem will be appreciated DD
-
I used ODBC "dBase files" to access a file GSTAT.DBF, my code is the following : DBName = GlobalDSN + "Gstat;UID=;PWD:"; ErrMsg = ""; res = "SELECT DATUM,CASHT,MCASHT,NETROOM,MNETROOM from GSTAT WHERE (DATUM = #08/01/2004#)"; gDB.OpenEx(DBName,CDatabase::noOdbcDialog); TRY { rs.Open( CRecordset::forwardOnly, res ); NbRecord = rs.GetRecordCount(); } CATCH(CDBException, e) .... The problem is that it works perfecly on the 1061 first records, but it refuses to find me the records 1062-1068 (1068 being the last record in file)... and I wonder why ? I thought that it could be due to a problem with MSjet 4.0 dll because mine is quite "old" (as far as I can see, my version 4.0.4431.3 is from SP5. I downloaded the SP8 from MS, but when I was to install it, I receive a message from the installation program saying that my version is too old and that I should have at least the SP3 ... Once again, I don't know why Any idea on 1st or 2nd of my problem will be appreciated DD
ok, i have found my 1st problem ... it is due to the wrong date format I passed in the WHERE clause, it must me in the US format (MM/DD/YYYY) and I was giving it in french format (DD/MM/YYYY) ... So, I don't need to upgrade the MSJet stuff Nevertheless, I would like to know if anyone has an idea on the strange message displayed by the prog supposed to upgrade MSJet ... Regards DD