Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long file name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01530741
Message ID:
01530748
Views:
40
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform