Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a record to a variable
Message
From
11/05/2015 09:48:22
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01619607
Message ID:
01619610
Views:
38
>>>I am creating a file name and then trying to create that file with data from a single record in a table a table - what am I doing wrong?
>>>
>>>SELECT collections
>>>
>>>refa="c:\driver\"+ALLTRIM(str(collections.refno))+ALLTRIM(collections.driver)+".csv"
>>>
>>>Copy To refa DELIMITED WITH "" WITH CHARACTER "|";
>>> FIELDS acclient,acad1,acad2,acad3,acad4,accontact,actel,coldate,readyat,closedat,notes,commodity,pieces,weight,globcutoff
>>
>>And what goes wrong? Btw, instead of ALLTRIM(str()), you can simply use Transform().
>>
>>Update: Try Copy To (refa) DELIMITED WITH "" WITH CHARACTER "|".....
>
>Thanks - have solved it - there was a space in the driver field which was causing a problem
>
>But thanks as always

Fine. I hope you also added the () around refa, or your file will always be called refa.txt.
Previous
Reply
Map
View

Click here to load this message in the networking platform