He's really parameter checking with that TYPE test, not checking that the alias 
is USED. 

--

rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Ken Dibble
Sent: Friday, July 17, 2015 8:19 PM
To: [email protected]
Subject: Re: "File In Use" on USE "during" SQL SELECT Execution


>procedure closeforsql
>lparameters thealias
>
>    if type("alias(thealias)")#T_U
>       use in (thealias)
>       endif
>
>    return
>
>    endproc

This is kind of similar to what my query class does to clean up after itself. 
However, my class keeps track of tables/work areas that were open before the 
query was run, and only closes those that the query itself opened.

It's interesting that you use a TYPE() check instead of USED(). Is there some 
reason this was preferable?

Thanks.

Ken Dibble
www.stic-cil.org


[excessive quoting removed by server]

_______________________________________________
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/bn4pr10mb09137275f3da398c2b94cfbed2...@bn4pr10mb0913.namprd10.prod.outlook.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.

Reply via email to