Using bookmarks causes recordset to lose knowledge of its Max records?

G

George Hester

Anyone know why this is and what can be done about it. Here is how I am
doing it for a Recordset (ADO) rt.

Set rtClone = rt.Clone
'I put rtClone to the record I want. How that is done wouldn't make sense
here but this is it
rtClone.Move v((i + 1)), 1
sBookmark = rtClone.Bookmark
rt.Bookmark = sBookmark

That's it. When the recordset rt goes to the bookmark it loses its
maxrecordcount. It becomes -1. This is ADO 2.7 in a DAP Access 2000.
 
A

a a r o n . k e m p f

are you using the clientside cursor?

and I really don't understand what you're trying to do. I usually just
FILTER for the one record I want to display, you know?

-Aaron
 
G

George Hester

Hi there. What happened is I was closing the rtClone and shouldn't have
been. The call to rtClone happens a few times and I thought I could close it
right after using it. But that caused the RecordCount to go haywire. Anyway
I took those close statements out and it was okay after. I don't use filter
because the Grid gets destroyed when I use a Server filter and so I have
been using a diferent way to get to the records I want. What you saw with
the bookmark was just one of the ways.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top