Click to See Complete Forum and Search --> : BOF ?
jax
Oct 15th, 2000, 02:55 AM
Hi guys!
How exactly does rst.bof works.
Does it refer to the first record in a recordset or what?
I tried to run a while loop and it does not seem to detect bof properly. What i am trying to do is to create page up and down effects, how should i do that without coding too complex?
James Stanich
Oct 15th, 2000, 10:06 AM
BOF is not the first record !!!
EOF is not the last record !!!
BOF - File Header
then Records 1 thru ???
EOF - File Footer (for lack of better term)
to determine that SQL return records use:
if rst!recordcount>0 or
if rst!EOF<> true
I have never used rst!BOF in any situation, but others may offer more insight...
honeybee
Oct 15th, 2000, 01:48 PM
You are right, James, BOF is not the first record and EOF is not the last record. It's the same concept from the good old dBase.
jax, try one thing. When you are moving forward in the recordset, keep checking for rst.eof Whenever the .eof returns true, position the record pointer on the last record (to prohibit further processing) or go to the first record (for a wrap-around-effect). Similarly while traversing the recordset backwards, you can check if .Bof is true, and if yes then take necessary action.
As James has already said, mind well that EOF and BOF do not point to any records.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.