Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to capture Sharing Violation error
Message
 
 
To
15/05/1998 12:25:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00099769
Message ID:
00099886
Views:
22
>Hi,
>
>I have a single user DOS application which I am now allowing to have a second user with read only rights. Some temporary tables created with sql selects (a cursor won't do since I need to chage some fields) have fixed names and sometimes lead to "sharing violation" errors in Windows 95. Since the goal is not to have to change too much of the code, I need to trap these errors, but don't know how to do it does anybody know how ?
>
>TIA,
>
>Alex

You can do it by creating Error Procedure trapping.

1. Issue ON ERROR DO errorproc WITH MESSAGE, ERROR() on you main program.
2. Your errorproc should be like this:

Procedure errorproc
PARAMETERS cmessage, nerror

* Where:
* nerror is error no. returned when error occurs.

DO CASE
CASE nerror = some_value
DO ACTION HERE
CASE nerror = some_value
DO ACTION HERE
....
ENDCASE

HTH
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform