Posted: Sat Feb 15, 2003 6:35 am
Restored from previous forum. Originally posted by Fangbeast.
I use the following bit of code to get the count of the total number of records in an Access Database using SQL. I have checked numerous sites for the correct syntax and they all agree.
However, this code returns a count of 4010 which is 373 records less than the actual number. I have check the database to be sure I am not going mad
???
Anyone have an idea what the heck is going on?
We are Dyslexic of Borg, prepare to have your ass laminated!
I use the following bit of code to get the count of the total number of records in an Access Database using SQL. I have checked numerous sites for the correct syntax and they all agree.
However, this code returns a count of 4010 which is 373 records less than the actual number. I have check the database to be sure I am not going mad
Anyone have an idea what the heck is going on?
Code: Select all
qry.s = "Select Count(*) from mydata;"
If DatabaseQuery(qry.s)
While NextDatabaseRow()
totalrecords = GetDatabaseLong(0)
Wend
Else
stat(0, "SQL Error: " + qry.s)
Return
EndIf
debug totalrecords