Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help for Error Handler
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00244324
Message ID:
00244622
Views:
11
>>>>Our office has a decent error handler currently, but needs one more piece to identify.
>>>>
>>>>Lets say in a program we have
>>>>
>>>>select * from SomeTable into cursor test1
>>>>
>>>>and the "SomeTable" is not yet opened, or part of the path. By default VFP will bring up the Open table dialog and wait for a response for the user to pick a file, or cancel. Only then, with the error get trapped upon return.
>>>>
>>>>Q: Is it possible to turn the automatic Open table dialog off so it goes directly to the error handler?
>>>>
>>>>TIA
>>>
>>>Probably, the better way is to check
>>>IF USED("mytable") before firing SELECT-SQL.
>>
>>Yeah, I would, but I don't want to go back to every possible select statement and pre-verify all possible tables being opened. Especially when many of the queries are all generated on the fly, and the aliases Source can constantly change... Yes, I could apply the IF USED( lcNewSource ), but again, don't want to go back to every class/form to qualify other developers code.
>
>IMO, it's the only way. If code is written poorly, then it got to be rewritten.

Ed,

I can assure you Ed that the code is not poorly written. It is however, extraodinarily complex.


Don,

It seems to me that this has to be a pathing issue because doesn't SQL open a table when necessary?

Steve
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform