Well I have the CFX_CSVtoQuery  tag,  I've installed it, and I can read in
comma delimited text files but not these CSV files I needed to use in the
first place.  It reads the file but says zero rows processed.  When I open
the .csv file in my trusty UltraEdit, it asks if I want to convert it to DOS
format, so I took a look at the .csv file in hex and the line endings only
have 0A not  0D 0A.  (in other words a line feed, not carriage return line
feed)   So I think the tag only recognises the file as a single line.

Anyone know what I can do about this?   I can't have the information
supplier make any change to the files - its' created automatically and FTP'd
into our site anew every day.

Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks


IF you're interested here's some extra data - the first few lines of one of
the files concerned (can't post more for copyright reasons), plus the code
I'm trying to use to access it.

First the file:

Cash Management Accounts - $1,000.00
"Institution Name","Account/Product Name","Effective Rate","Nominal
Rate","Website Link","Customer Service Phone"
"Institution Number One","Youbeauty
Account",4.8025,4.70,"http://www.institutionone.com.au","1800-666-666";
"Institution number two","Cash Management
Account",4.3337,4.25,"http://www.institutiontwo.com.au","1800-555-555";


Now the code:

<CFSET CSV_StartRow = 2>

<CFX_CSVToQuery
    FILE="C:\Inetpub\wwwroot\testdir\td6m20k.csv"
    NAME="MyQuery"
    ROWNUMBERS="LineNum"
    MAXROWS="15"
    STARTROW="#CSV_StartRow#"
    LONGROWSARE="BAD"
    ONBADROW="SKIP">

<CFOUTPUT>
    <P>Rows Read: #CSV_RowsProcessed#<BR>
    Bad Rows:     #CSV_BadRows#<BR>
    ReachedEOF:   #CSV_ReachedEOF#<BR>
    StartRow:     #CSV_StartRow#<BR>
  </CFOUTPUT>

<cfdump var="# MyQuery #">

And this results in a page that shows the following:

Rows Read: 0
Bad Rows:
ReachedEOF: YES
StartRow: 1



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to