Discussion Locked

DAO, ADO difference

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm using VB6 and Access2002.
When I was using DAO, to retrieve my position in the recordset I would go
rs.percentposition

This option doesn't appear to be available to ADO recordsets.

Whenever I try to use rs.absoluteposition it returns some negative numbers.

Can anyone tell me the ADO equivalent to rs.percentposition and explain what rs.absoluteposition is for?

Thanks for your time.

3 replies

by seagull data services

rs.absoluteposition is the current location (record number) in the recordset. If you have the MSDN Library CD you can search fpr absoluteposition under Platform SDK, Database and messaging services. Or I found it on MSDN Online on a boolean search for "absoluteposition property" AND ado AND recordset.
To determine the approximate %position divide the rs.recordcount property by the absolute position.

by craig shepherd

Thanks. The msdn article helped. I needed to add one line of code.
rs.Open "select * from employees", cn, adOpenKeyset

This discussion is closed to new replies.