>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.