Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for a dbf
Message
From
28/03/2006 17:06:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/03/2006 14:13:55
Steven Kleypas
Tarrant County College District
Texas, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01108521
Message ID:
01108609
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
>I have the need to test to see if the user selected a file that can be opened as a vfp table. I know i can set the errorhandler temporarily to return false if there is an error when opening a file, but isnt there a built in or better way to do this?
>
>Thanks for your valuable time

There's a certain byte in table's header (and it's described somewhere in the frx reports you get with VFP - don't know exactly where) but it's not reliable at all. The expected value may be there accidentally, or it could be a crashed table where that part of the header may be intact but you still wouldn't be able to open. Or your user wouldn't have the rights to open it anyway.

So I'd agree with Nad... Naomi, just try to open it - wrap the attempt in some error handling - and if it works, it does, if not, notify user.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform