|
-
Apr 30th, 2001, 08:40 AM
#1
Thread Starter
Frenzied Member
Moving to the last record in a recordset.
I have the following code in my app :
*************************************************************
Set db = New Connection
db.CursorLocation = adUseClient
' db.open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=G:\Developers\SCR Database\SCRsystem.mdb;"
db.open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\SCR System\SCRsystem.mdb;"
' Open employee table.
Set adoprimaryrs = New Recordset
adoprimaryrs.open "select * from [SCR List]", db, adOpenStatic, adLockOptimistic
adoprimaryrs.MoveLast
*************************************************************
For some reason, the last record in this collection is not the last record in the database (if I check it manually).
Anybody know why this would be so ?
-
Apr 30th, 2001, 08:51 AM
#2
Member
You could try setting your connection to an ADODB.connection and your recordset to an ADODB.recordset. That ensures that the ado methods work properly.
Eva
-
Apr 30th, 2001, 09:26 AM
#3
Thread Starter
Frenzied Member
OK done that.
Still get same response. The recordcount tells me 281, which is correct, but when I try a ".movelast" and then display a field from the record, it is from a record roughly 2/3 of the way through the collection !!!
There are no filters on my SQL statement, as you can see above, so I'm a bit stumped on this one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|