On Wed, Jan 27, 2016 at 5:35 AM, Sytze de Boer <[email protected]> wrote:
> sele 909
> use (ltable) alias Junk1 Excl
> If I issue wait window alias(), it returns Junk1
> If I
> use (ltable) alias "Junk1" Excl, it returns Junk1 as well
> Is this normal?
I don't use quotes when specifying an alias
> I ask because I have a client who consistently ends up with an error
> variable code not found
If the table could not be opened, then table.code would not be accessible!
So my suggestions:
1. "select 0" is better than "select 909"!
2. Use used() to check whether the table was opened
3. Because you are trying to open a table EXCL, you should set ON ERROR!
Better, use TRY... CATCH if you are using VFP 9.
LOCAL m.errhand
m.errhand=ON("ERROR")
ON ERROR *
SELECT 0
USE (lTable) EXCLUSIVE ALIAS junk1
ON ERROR &errhand
IF USED()
*
* do your stuff
*
REPLACE junk1.code WITH .....
USE
ENDIF
--
.~. Might, Courage, Vision. SINCERITY!
/ v \ 64-bit Ubuntu 9.10 (Linux kernel 2.6.39.3)
/( _ )\ http://sites.google.com/site/changmw
^ ^ May the Force and farces be with you!
_______________________________________________
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/CAGv=mjaed130bljy+b0snqxzejb6ebgrydjzcuymovmdrbf...@mail.gmail.com
** 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.