Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to trap error - File Access is denied
Message
De
28/08/2002 14:11:24
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
 
 
À
28/08/2002 14:06:15
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00694551
Message ID:
00694575
Vues:
9
you need to issue the ON ERROR statement before issuing the
command that causes the error.
LOCAL An_Access_Error_Occurred

...

ON ERROR An_Access_Error_Occurred = .T.  && catches all errors, but
                                         && exclusivity is probable error
An_Access_Error_Occurred = .F.
SELECT 0
USE (my_file_spec) ALIAS my_alias EXCLUSIVE

ON ERROR                   && reset to default error handler

IF ( An_Access_Error_Occurred = .T. )
  =MESSAGEBOX ( 'Cannot open file exclusively' , 0 , 'FILE ACCESS ERROR' )
ENDIF
patrick
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform