Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding the OPEN TABLE dialog box
Message
From
05/12/1998 12:07:12
 
 
To
05/12/1998 11:45:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00164261
Message ID:
00164466
Views:
19
>Thanks, but I am really wondering if there is some way that I can configure VFP to error out when such a condition arises. The last thing I want is for such a dialog box to pop up at a customer site. I would much prefer to trap this condition and deal with it apropriately.

It doesn't seem to be trappable; no error gets handed to the VFP error handler for the couple of examples I tried unless you fail to respond to the OPEN dialog, and I don't see somewhere that you could cause it to function differently. You'd have to encapsulte your offending code to check if there is currently a file in use in the current work area, something like:
IF USED()
  LOCATE FOR... && or whatever else you want that needs a table open in the CWD
ELSE
  *  nMyIDidSomethingDumbError is an integer corresponding to the value
  *  given to the error handler;  if VFP has an error that it handles the
  *  way you want (like shutting down), fine, otherwise, add code to your
  *  error handler to deal with this when this error code is seen
  ERROR nMyIDidSomethingDumbError  && Hand the error off to your error handler
ENDIF
>
>> You must be using functions like locate, seek etc., without opening necessary table. Check your code for this using debugger
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform