This content has been marked as final. Show 3 replies
I assume that by using the "name" parameter you're trying to process the file as a query. That is why you're getting the error. You might be better off trying to process it as a block of text.
Get rid of the name and the contents of the file will be in the variable CFHTTP.FileContent . You'll have to develop a function to loop through the file and parse the contents. If every record has a CR in column 7, for example, you could extract each record by looking for each second CR. Then you treat it as a comma-delimted list.
My first attempt to filter out the carriage return would be something like
<cfset prematureEndOfRow = chr(13)&",">
<cfset content = replace(content, prematureEndOfRow, "," ,"all")>
Dempster, thanks. It struck me as I read your answer. It is an extra step, but I am importing the file as text, removing the carriage returns, and then pushing it back into a query object using QueryNew()