>>Hi everybody,
>>
>>In the form I adapted there is the following code
>>
>>select * from (tcReportName + .RepExt) ...
>>USE IN (tcShortName)
>>
>>where tcShortName is the JUSTSTEM(tcReportName).
>>
>>This code fails when the file name has spaces in it. In my tests I found that spaces are replaced with _.
>>
>>The question is - how can I close reliably the alias opened by selecting everything from the file name?
>>
>>I can try
>>
>>use IN (select('My Long File Name'))
>>
>>It will not fail, but I assume will not close the opened table either.
>>
>>Thanks in advance.
>
>What I usually do, and for other reasons too, is to not let the select statement open the tables
>
>
>USE (tcReportName + .RepExt) AGAIN SHARED IN 0 ALIAS SHORTNAME
>SELECT * FROM SHORTNAME INTO CURSOR C_NAME
>USE IN SELECT('SHORTNAME')
>USE IN SELECT('C_NAME')
>
I think I'll go with this solution. I started coding AUSED solution, but I think I better will use this one.
If it's not broken, fix it until it is.
My Blog