Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test if a table is valid before opening
Message
From
01/04/2008 19:36:57
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01307527
Message ID:
01307530
Views:
9
Hi Jim

Use try endtry.
try 
   use table
catch to loerror
   if loerror.error = error_number???
      handle the problem here. 
   endif 
endtry 
>Is there a way of testing if a table (filename.dbf) is valid before attempting to open and use it. I have an application that uses tables that are sent via FTP, and every once in awhile, I get one that gives the error message that "c:\path\filename.dbf is not a table." and my program crashes.
>Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform