Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for Exclusive Open?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00741115
Message ID:
00741472
Vues:
34
>Or, also as Garrett suggested, for VFP8, something along these lines:
>
>TRY
>   USE HOME(2) + "data\customer" IN 0 EXCLUSIVE
>CATCH TO OERR
>   MESSAGEBOX(TRANSFORM(OERR.MESSAGE) + CHR(13) + ;
>      "LINE #:" + TRANSFORM(OERR.LINENO) + CHR(13) + ;
>      "LINE:" + TRANSFORM(OERR.LINECONTENTS), ;
>      16, "ERROR IN " + TRANSFORM(OERR.PROCEDURE))
>FINALLY
>ENDTRY
>
Ewww. How about this instead?
TRY
   USE HOME(2) + "data\customer" IN 0 EXCLUSIVE
CATCH TO oErr
   IF oErr.ErrNo = 1705
      ? "Could not get exclusive use of customer table"
   ELSE
      THROW oErr
   ENDif
FINALLY
   CLOSE DATA ALL
ENDTRY
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform