When you say "I try to print it out" do you mean display it on a web page
or print the file contents to a printer? The file may inadvertently
contain control characters, possibly an end of file marker, which could
cause it to not print completely on a printer. Removing control
characters from the file with a regular expression would probably fix the
problem.
If you knew that the fields will always be the same, and in the same
order, then you could just throw out the first line, and parse the file
contents yourself(most likely using CF list functions), rather than
bothering with using ODBC. If you want to use your ODBC datasource, then
you could once again use a regular expression to replace spaces with
underscores in the first line's field names, then write the file back to
disk before making your query.
Jim
-----Original Message-----
From: Don Vawter <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, April 13, 2000 8:16 PM
Subject: CFFILE Woes
>I receive a text file over which I have no control. It is an ascii
delimited
>file with column names in the
>first line. When I try to read it in using cffile:
>
><cffile action="READ" file="I:\Stressless\sl0930\downloads\inventory.txt"
>variable="inventory">
><cfa_dump var="#inventory#">
>
>it gives the proper length string but if I try to print it out it
truncates
>after about 350 characters. (No its not the cfa_dump tag it happens with
>cfoutput also)
>
>If I open it in studio and then save it (making no changes) and use
cffile
>again it comes in properly.
>
>Also if I create an ODBC datasource for the file and bring it in as a
query
>it comes in fine. The only problem with that is <RANT>the owners of the
file
>have spaces in field names</RANT> and I can't refer to them in CF (unless
>someone else can give me a hint on that).
>
>If this were a one time occurence I would just clean up the names in
studio
>and be done with it. Unfortunately it comes in daily.
>
>Any suggestions? TIA
>Don
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.