General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Question on this code:
LOCAL cErrorHandler
* ----- Store the current error handler
cErrorHandler = ON("error")
* ----- Turn Error Handler off
ON ERROR *
* ----- Attempt exclusive open
SELECT 0
USE mytable EXCLUSIVE
* ---- Reset error handler
ON ERROR &cErrorHandler
IF NOT USED("mytable")
* ----- File wasn't opened
* Add appropriate code here
ELSE
* ----- File opened exclusively
* Add appropriate code here
ENDIF
I'm trying to use this code in a .exe file that is run unattended on a server. The problem is, once you turn the error handler off a message window is displayed which requires user intervention.
How do you do you test for exclusive use and still send the results to an error routine.
Keith Larsen
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only