Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can we use PACK in Network ?
Message
From
12/01/1999 04:57:05
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
 
 
To
10/01/1999 21:31:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174552
Message ID:
00174957
Views:
27
> SET EXCL ON
> SELE 1
> USE SALE
Add the following check after "USE SALE EXCLUSIVE"

if used("SALE")
  * file could be exclusively used, meaning that
  * no one else is in the system
else
  wait window "System in use!"
  ...
endif
<\pre>
>                DELE ALL FOR SALDATE >= A
>                PACK
>        ENDIF
>        ......
>        ......
>
>For this sample I have trouble that error "Database access deny"  I thinks it is so because at the begining of my program I use "set excl on"
>  Thanks for your time.
<pre>
You need to trap the "file access denied" error using:

on error do errhand with error()

procedure errhand
parameter m.errno
  do case
    case m.errno=1705
      * someone is using the file
      * do nothing, let used() to deal with it
    otherwise
      wait window "Unexpected error!"
      quit
  endcase
return
Regards,
Mr. Man-wai Chang
Previous
Reply
Map
View

Click here to load this message in the networking platform