Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exclusive use of table
Message
From
10/07/2001 20:04:51
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
 
To
10/07/2001 19:45:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00508197
Message ID:
00528985
Views:
20
Hi Keith,

I'm not sure what you mean. Are you saying that after issuing 'ON ERROR *' a MessageBox is displaying on the server? All the code is doing is turning the error handler off and turning it back on after trying to open a table.

Gavin...

>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
Reply
Map
View

Click here to load this message in the networking platform