wilsoada
asked on
ADODB Recordset Max Records
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???
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???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
wilsoada,
You're most welcome.
Regards,
Patrick
You're most welcome.
Regards,
Patrick
ASKER