Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

navigation buttons

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
0
0
US
I have connected to a sql database with a connection string and I am using ado and sql to retrieve recordsets. Can anyone tell me what I have to do to use the four move commands. I keep getting either eof or bof errors aspvbwannab
 
Hmmm...

If you're getting BOF or EOF errors, the first thing I'd look for is wheather your recordset is populated (Adodc1.Recordset.RecordCount). If this is non-zero, then you should be able to use the MoveFirst, MovePrevious, MoveNext, and MoveLast of the Recordset to navigate. e.g. Adodc1.Recordset.MoveNext. If your recordset is populated and u still have problems, lemme know...

~Mike
Any man willing to sacrifice liberty for security deserves neither liberty nor security.

-Ben Franklin
 
Mike I am not using a data control but will try to use the recordcount property anyway. Thanks aspvbwannab
 
The Recordcount propert should work fine even if you are not using a data control.

A tip though with the recrodcount that I've found is that if you do not open with the correct cursortype you will not have a recordcount. In this situation I'd advise to check the recordset.EOF to see if it is true.

Hope this helps.

Oh if anyone can explain why the recordcount will only be available under certain cursortypes I'd gladly like to know. Never know when it might come in handy.

Mavors
Cincinnati, Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top