Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can we use PACK in Network ?
Message
De
12/01/1999 04:57:05
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
 
 
À
10/01/1999 21:31:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00174552
Message ID:
00174957
Vues:
28
> 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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform