So ... I changed the file reference to the file in the ftp directory that I read in, thus short-circuiting the whole processing of the text, and the tag worked ok.
Now .. my CFFILE is reading in the .csv files that are ftp'd in each day. The CFLF processing is happening, and it's writing out a valid .CSV file (judging by the fact that I can see it ok in Excel). The tag CFX_CSVToQuery will read the original unprocessed files, but not the processed ones, even when instead of using the variable #temppath# I hard-code in the physical path to the file. I get zero rows processed. I would have thought if the processing was turning the files into mush, the tag would read them in and give a whole lot of bad rows, rather than reading in zero rows, yes? SO therefore it's not even reading the temporary.csv file in. Am I understanding this correctly? Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Kear Sent: Friday, 28 February 2003 3:36 PM To: CFAussie Mailing List Subject: [cfaussie] RE: CFX_CSVToQuery tag just stopped working ... huh? Ah... I took your suggestion and dumped the #CSV_RowsProcessed# variable. ZERO. SO that's why it's not writing out the query. It's not reading any file in. The file it's supposed to read in, temporary.csv will open in excel, but the spreadsheet shows the rows are double-spaced, i.e. there's a row of content, a blank row, then a row of content. But I wouldn't have thought that would have prevented the tag from reading it in. I would have thought it would have just added to the bad rows count. Same result, by the way, when I stopped processing the CRLF on the original files by commenting out the lines that do that. And thanks, but I still have the documentation for the tag. Any other suggestions? (anyone else is welcome to chip in here.. this is not a private conversation here ... <g> ) Here's how the code looks now: <.CFX_CSVToQuery FILE="#temppath#\temporary.csv" NAME="csv" LONGROWS="GOOD" ONBADROW="USEANYWAY" COLUMNS="#columns#" STARTROW="3"> <.p>Rows processed: #CSV_RowsProcessed#<.br> Bad rows: #CSV_BadRows#<./p> <.cfdump var="#CSV#"> Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Silva Sent: Friday, 28 February 2003 3:02 PM To: CFAussie Mailing List Subject: [cfaussie] RE: CFX_CSVToQuery tag just stopped working ... huh? Michael, while you're checking the incomming CSVs, id check to make sure that the temporary.csv file you're generating is a legit csv (try and open it in Excel). The problem may lay further back in your application. Also try dumping these two vars AFTER the CFX tag, they might shed some light on your problem: #CSV_RowsProcessed# - the number rows that were read from the file, regardless of whether they were good or bad. #CSV_BadRows# - a comma-separated list of "bad" row numbers. So if the 5th and 10th lines of the file were bad, this variable would be set to "5,11". Thus, #ListLen(CSV_BadRows)# will return the number of bad rows found. BTW, i just checked my code, and im using a single #chr(13)# as the terminating character for each line in any csv i create (not sure what your using). I found mucking around with CR/LF fixed my initial "column headings only" issues. If you need a copy of the html doc the tag comes with, just let me know, ill send you a copy off list. _______________________ James Silva Web Production Gruden Pty Ltd --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/ --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
