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
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.