Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: CF10 - CFLoop with a File - Only read in first row

$
0
0

Is the file in a web-accessible location?  If so, a quick way is to use CFHTTP to read the CSV directly into a ColdFusion query object. Then you can use that query object to populate your temp table.  See Dave Fergusons's blog entry on this: http://blog.dkferguson.com/index.cfm/2011/9/28/CSV-File-Reading-using- cfhttp.

 

Otherwise, open the file using CFFILE and loop throught the contents (exiting after the first row if necessary).

 

HTH,

-Carl V.


Viewing all articles
Browse latest Browse all 21760

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>