USE mytable IN SELECT([mytable])

If it's not USED the SELECT() function returns the equivalent of the next available workarea. If the assumption is that you just want that table open, this eliminates any amibiguity. Of course as you've pointed out, if another user or process has an exclusive lock on the table, you'll still get some kind of file access error. Yes, there's some overhead to reopening the table but there's also overhead to checking to see if it is already in use, so as Uncle Ted would point out, you have to test that in your application environment to determine if that overhead is meaningful.

You can also wrap your USE statements in a TRY..CATCH and handle both error 3 or 108 or any other file access specific error as appropriate.

Yup, stay tuned. I wrote the framework before there was TRY...CATCH.

Thanks.

Ken

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to