Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still struggling with File to string
Message
De
15/10/2014 09:27:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01609421
Message ID:
01609428
Vues:
43
Probably. Remember that these characters are invisible, you must open the file in an hex editor in order to see them. You will see them as 0A (chr(10)) and 0D (chr(13)) respectively. Fortunately VFP ships with a simple HEX editor. Try this command:
Do Addbs(Home()) + [tools\hexedit\hexedit.app] With 'yourfile.yourext'
>Boris
>
>Are you saying that what i have done has worked?
>
>Thanks
>
>Colin
>
>
>>There is CRLF at the end of the line, if there is not such chars, you will see something like this:
>>
>>"A","GOPT","TEST11","10/13/2014","966.15","HAYES","GBP","61.86","GB""B","1234567","10/06/2014","15.00","7220717","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","CREDIT SUISSE","","1 CABOT SQUARE","CANARY WHARF","LONDON","LO","E14","GB","UKSTD"
>>
>>
>>
>>>Despite some generous help from others I am still struggling with a file to str problem
>>>
>>>My database has a file with 1 field a memo field - I am required to create a text file as shown below but with each records terminating with a carriage return
>>>
>>>I can create the lines of test OK but not the terminating carriage return
>>>
>>>So If I use the following code I get the right answer without a carriage return at the end of each record - records start with an A or a B
>>>
>>>SELECT eit
>>>scan
>>>strtofile(narry+ chr(13)+CHR(10), 'c:\colineit.txt', 1)
>>>ENDSCAN
>>>endif
>>>
>>>
>>>"A","GOPT","TEST11","10/13/2014","966.15","HAYES","GBP","61.86","GB"
>>>"B","1234567","10/06/2014","15.00","7220717","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","CREDIT SUISSE","","1 CABOT SQUARE","CANARY WHARF","LONDON","LO","E14","GB","UKSTD"
>>>
>>>"B","2345678","10/06/2014","46.20","7220718","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","DEUTSCHE BANK","","1 CABOT SQUARE","CANARY WHARF","PARIS","LO","E14","FR","UKSTD"
>>>
>>>"B","3456789","10/06/2014","53.00","7220719","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","BNP PARIBAS","","1 CABOT SQUARE","CANARY WHARF","NEW YORK","LO","E14","US",""
>>>
>>>"B","4567891","10/06/2014","142.00","7220720","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","JAGUAR CARS","","1 CABOT SQUARE","CANARY WHARF","FRANKFURT","LO","E14","DE","UKSTD"
>>>
>>>"B","5678912","10/06/2014","78.00","7220721","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","MORGAN STANLEY","","1 CABOT SQUARE","CANARY WHARF","MADRID","LO","E14","ES","UKSTD"
>>>
>>>"B","6789123","10/06/2014","56.28","7220722","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","POWER FINANCIAL DO BRASIL S.A.","","1 CABOT SQUARE","CANARY WHARF","RIO DE JANEIRO","LO","E14","BR",""
>>>
>>>"B","7897897","10/06/2014","18.00","7220723","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","POWER PLATE MEXICO SA DE C.V","","1 CABOT SQUARE","CANARY WHARF","MEXICO CITY","LO","E14","MX",""
>>>
>>>"B","4564567","10/06/2014","247.86","7220724","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","PT INDOKORES SAHABAT","","1 CABOT SQUARE","CANARY WHARF","JAKARTA","LO","E14","ID",""
>>>
>>>"B","7897897","10/06/2014","123.47","7220725","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","JAGUAR & LAND ROVER CHINA","","1 CABOT SQUARE","CANARY WHARF","CHINA","LO","E14","CN",""
>>>
>>>"B","4561234","10/06/2014","98.50","7220726","MERRILL CORPORATION LIMITED","CUSTOMER SERVICE","101 FINSBURY PAVEMENT 2ND FLOOR","LONDON EC2A 1ER","LONDON","","EC2A 1ER","GB","MAYER INTERNATIONAL LTD","","1 CABOT SQUARE","CANARY WHARF","INDIA","LO","E14","IN",""
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform