Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long file name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01530741
Message ID:
01530748
Vues:
38
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform