Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
bmyers #1
cfhttp query text file
I use cfhttp to create a query from an ascii text file. The text file is comma
delimited, with quotes around text.
This works fine in CF5 and older versions - no problems at all.
But in CFMX, the cfhttp command produces an error if the ascii file has an
beginning or ending blank field.
By this, I mean if the data line looks like:
,,"data",,,,"data"
Or
"data",,"data",,,
Then cfhttp will produce an error.
If I enter data into the beginning and ending fields, the problem goes away.
This problem only exists on cfmx - and not on cf5 or earlier versions
I've posted the code below.
Again, this works perfectly in older versions of CF, but fails everytime in
CFMX.
Does anyone know a work-around for this problem?
Thanks,
Bill
<CFHTTP url="http://sitename.com/contenthold.txt" method="GET"
name="memroster" textqualifier='"' delimiter=","
columns="ID,FirstName,LastName,FullName,Title,Firm ,Address,City,State,Zip,Email,
Phone,Expire,username,password,SubNum" resolveurl="false" timeout="90">
bmyers Guest
-
Create text file from query
I wantto create a simple text file from the requlsts of a query, but I can't seem to escape thequotes right. I am trying to run... <cfset... -
CFHTTP get file problem
Hi, I have code to read a text file on my server and process it into a database, this works fine. The text file comes from a remote server that... -
CFHTTP Query & Order By
I'm using CFHTTP in order to query a remote CSV file, which works a charm. However, I would like to be able to sort the results by the value in... -
text file to query using cfhttp
Did you ever find out what causes this issue? It's happening to me now... String index out of range: -1 Same situation, only I'm using a single... -
Best way to query a flat fixed length text file
I am trying to insert a semi fixed length file into a SQL database. Does anyone know of a way to query a fixed length file like you can a csv to...



Reply With Quote

