Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dbf?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Dbf?
Miscellaneous
Thread ID:
00588853
Message ID:
00588857
Views:
27
>Hello All,
>I am receiveing files that do not have the dbf extension. Is there a way to check to see if a file is a foxpro table or just a txt file?
>

Sandy,

One way is to try to use the file and trap for an error:
local lcOldError, llUseError
lcOldError = on("error")
llUseError = .f.
on error llUseError = .t.
use "myFile.txt" in 0
on error &lcOldError
if llUseError
    * unable to open file, not a table
else
    * file is a valid table
endif
HTH,
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform