Naoto
The VFP table fioeld should have been a memo field but for some reason I had been using a character filed hence the truncation - thank you very much for all your help - I will implement what you hav suggested
Colin
>>Naoto you said to to get rid of the extraneous lines with dashes, we could modify thusly: but I get errors with cbuf so what i did was
>>
>>#DEFINE _CR_ CHR(13)
>>#DEFINE _LF_ CHR(10)
>>#DEFINE _NL_ _CR_+_LF_
>>SELECT eit
>>SCAN
>> narry=ALLTRIM(narry)
>> = strtofile(narry, 'c:\colineit.txt', 1)
>> = strtofile( _NL_,'c:\colineit.txt',1)
>>ENDSCAN
>
>Note: The statement "narry=ALLTRIM(narry)" is not likely to do what you may have intended -- it takes the value stored in column narry and strips off leading and trailing blanks, then stores the results into a variable named narry -- it doesn't affect what is stored in the column (to change the value of a table column you need to use REPLACE). Subsequent references to narry will reference the table column (if the table in the current one SELECTed), rather than the variable (column names have precedence over variables with the same name -- you can override this by using the "m." prefix to specify that you want to reference the variable).
>
>You could collapse the three statements inside the SCAN..ENDSCAN into one.
>
>
#DEFINE _CR_ CHR(13)
>#DEFINE _LF_ CHR(10)
>#DEFINE _NL_ _CR_+_LF_
>SELECT eit
>SCAN
> = strtofile(ALLTRIM(narry)+_NL_, 'c:\colineit.txt', 1)
>NDSCAN
>
>>Can you tell me whether in your opinion this works or not - it looks Ok to me
>>
>>Sorry to be such a nuisance but I can't seem to produce a file which my client accepts
>
>A quick look at some of the output lines you give, there appears to be some lines that may have been truncated (there are some values at the end that aren't properly terminated with a quote). You may want to check the table contents to make sure everything is OK. If the "narry" column is a character column, you may be running into trouble because what you tried to store into it exceeded the maximum length of the column (in xBASE character columns are limited to at most 254 characters). If the column "narry" is a memo field, you will probably want to check the contents of the memo field, to make sure that what is contained in there isn't truncated.
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing