Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for Exclusive Open?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00741115
Message ID:
00741472
Views:
33
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform