K
kmhuntly
I have a VB6 app that interfaces with an access database. The access
database has about 100,000 rows or so, and I want to limit the
resultset to 50 rows at a time. I have an SQL statement that reads as
follows:
SELECT TOP 50 * FROM Table WHERE foo IS blah ORDER BY date ASC;
I am using ADO to make the connection and open the recordset, my ADO
options are adOpenKeyset and adLockOptimistic.
Each time this query is run from the application, the recordset
returned is consistently higher than 50, sometimes only by a few,
others by a few hundred. I've tried everything I can think of to
resolve this, but haven't been able to yet. The same query works as
desired in Access 2003 from an SQL window, and was working in the
application when it was Access 97 backing it.
database has about 100,000 rows or so, and I want to limit the
resultset to 50 rows at a time. I have an SQL statement that reads as
follows:
SELECT TOP 50 * FROM Table WHERE foo IS blah ORDER BY date ASC;
I am using ADO to make the connection and open the recordset, my ADO
options are adOpenKeyset and adLockOptimistic.
Each time this query is run from the application, the recordset
returned is consistently higher than 50, sometimes only by a few,
others by a few hundred. I've tried everything I can think of to
resolve this, but haven't been able to yet. The same query works as
desired in Access 2003 from an SQL window, and was working in the
application when it was Access 97 backing it.