Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello can anyone help me about my problem. i created a program using adodb in vb6. the problem is when i move the cursor using the .movelast statement it doesnt work.
for example i have a field orno in autonumber
1
2
.
.
.
44
when i used movelast it only read upto 39 to the last number is 39 but it should be 44

thanks..
Posted
Comments
thatraja 14-Nov-10 23:40pm    
What's the error message? mention in your question.
Rajesh Anuhya 15-Nov-10 1:23am    
can you provide that code...

1 solution

The problem is that not all database drivers supports the complete set of ado methods. For some the RecordCount only gives accurate information if MoveLast is called first. As you encounter, this method isn't working correctly. This means you have to improvise to to get compatible results. You could implement your own method and simply do:
do until rs.Eof 
  rs.MoveNext
loop


This link has some nice info on this:
http://flylib.com/books/en/3.405.1.32/1/[^]

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900