> Anyone know why I might be getting the following error when > trying to query > a text file? > > **** text file contents ***** > col_a, col_b, col_c > a,b,c > d,e,f > g,h,i > > **** cf code **** > <cfhttp url="http://127.0.0.1/text2.txt" > method="GET" > name="textFile" > textqualifier="""" > delimiter="," > resolveurl="false"> > > <cfoutput query="textFile"> > #textFile#<br> > </cfoutput>
There are three potential problems that I can see. First, for the TEXTQUALIFIER attribute, you want to specify the character before and after each string of text. If those characters are double quotes, and you're using a double-quoted string to specify the TEXTQUALIFIER attribute value, you'd need to specify TEXTQUALIFIER="""""" instead of TEXTQUALIFIER="""". Second, in your text file itself, you don't seem to have any textqualifier characters at all, so you probably don't want to specify them in your CFHTTP tag. Third, have you checked to ensure that if you go to "http://127.0.0.1/text2.txt" in a browser on your server, you get the text file as opposed to, say, a 404 error? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists