troubleshooting Question

ADODB Recordset Max Records

Avatar of wilsoada
wilsoada asked on
Visual Basic Classic
3 Comments1 Solution1724 ViewsLast Modified:
I have a table using ADODB connectivity with VB6 and an Access 20000 db on my local machine. The connections are fine I can add, delete, update my db. My question is one table has 60,000 records. When I run:

        Set myRS = New ADODB.Recordset
        With myRS
            Set .ActiveConnection = myConn
            .CursorLocation = adUseClient
            .LockType = adLockReadOnly
            .CursorType = adOpenDynamic
            .Source = "SELECT * FROM Table"
            .Open
            If .RecordCount <> 0 Then
                .MoveLast
                text1.text = .Fields("Field")
            End If
            If .State = adStateOpen Then
                .Close
            End If
            Set myRS = Nothing
        End With

So the .recordcount = 60,000 then when I .MoveLast and set the .Fields("Field) it sets the textbox to 57302 when the table goes from 0-59999

For some reason it returns the correct number of records but will not move past the 57,302nd record. What gives???
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros