Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EOF and BOF with Local Views
Message
From
14/02/2015 16:20:55
 
 
To
14/02/2015 11:41:13
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01615325
Message ID:
01615327
Views:
75
>Can you use EOF and BOF commands with views. My code reads:
>
>sele v_vendors
>
>do case
> case bof()
> **do something with navigation button
>
> endcase
>
>But nother happens. I'm sure I'm sitting on the first record in the table so therefor shouldn't BOF = .T.?

No.
USE SomeTable && or SomeView
GO TOP && for illustration only, not strictly necessary, goes there by default on table/view opening
?BOF( ) && .F.
SKIP -1
?BOF( ) && .T.

GO BOTTOM
?EOF( ) && .F.
SKIP 1
?EOF( ) && .T.
BOF( ) and EOF( ) can be useful for processing records with SKIP but other than that are pretty much useless.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform