Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long Filename to short filename~
Message
De
06/11/1998 11:31:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/11/1998 01:47:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00154708
Message ID:
00155252
Vues:
22
Hi Virusim,
SELECT * ;
     FROM 'C:\my installations\report\data', ;
          'c:\my installations\data\data_file' ;
          INTO DBF 'C:\temp file\test'
If files were already opened or not their aliases would be "data" and "data_file" (first 10 chars of tablename if not duplicated-and not this simple always, but exceptions are rare). So you would close source tables with their alias :
use in "data"
use in "data_file"
BTW you can use this quoting for name expressions freely and it's wise to surround them with parentheses. ie:
lcFilename = "somefile"
use ("c:\temp\long filename dir\"+lcFilename) alias myAlias
use in ("myalias")
erase ("c:\temp\long filename dir\"+lcFilename+".*")
lcDataFile = "mydbf"
lcDataPath = "\\myserver\My shared data dir"
set path to (lcDataPath)
use (lcDataFile) alias RemoteData in 0
use in "RemoteData"
Cetin

>Hi,
>
>Thank a lot for your help and advise. I managed to get it to work. However,
>i like to know how do I close the file after use in the SQL command like
>
>SELECT * FROM 'C:\my installations\report\data', 'c:\my installations\data\data_file' INTO DBF 'C:\temp file\test'
>
>
>How do I close all the source file - data_file and data file are used. Can
>using the command 'USE ' only close all the data file.
>
>Thank in advance.
>
>
>
>
>
>
>
>
>
>>>Hi,
>>>
>>>I like to know how do we change the long path name and filename obtain from the GETFILE() into the DOS short form name ? I had problem opening the file in folder with long name like
>>>
>>>From
>>>
>>> USE C:\My Installation\Report
>>>
>>>TO
>>>
>>> USE C:\Myinst~1\Report
>>>
>>>
>>>
>>>Any help or advise is very much appreciated. Thank you.
>>Hi,
>>Although you could convert using winAPI, you don't need to, just include the name in quotes :
>>USE "C:\My Installation\Report"
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform