Ah - you should check and see if read_file is empty first - before your
cfloop, do a dump on that. Make sure you are actually looping. Or you
can also add debug statements in your cfloop tags..

<cfoutput>Going over a line, the line is #line#, enjoy<p></cfoutput>

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Rafael Alan Bleiweiss [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 29, 2003 3:20 PM
> To: CF-Talk
> Subject: RE: CSV loop
> 
> 
> Ray,
> 
> Thanks so much for guiding me through all this - it's quite 
> frustrating...
> 
> OK, so how do I implement it?  I tried the code below, and 
> again, it comes 
> up with a blank...
> 
> <cfset delims=",">
> <cfset numcols="3">
> <CFOUTPUT>#Delims#</CFOUTPUT>
> <!--- read the file -->
> <cffile
>       action=read
>       
> file="c:\inetpub\wwwroot\briona\secure\modernstorage\shop\cont
> rol\QuantumModify.csv"
>        variable="read_file">
> 
> <cfloop index="line" list="#read_file#" delimiters="#chr(13)#">       
>     <!--- loop through the columns -->
>     <cfloop from="1" to="#numcols#" index="num">
>        <cfquery name="update_file" datasource="ModernStorageECom">
>           UPDATE  Products
>           SET
>           JPG = '#listgetAt('#line#',2, ',')#"',
>           PDF = '#listgetAt('#line#',3, ',')#"'
>           where (MFGPartNumber = '#listgetAt('#line#',1, ',')#"')
>        </cfquery>
>     </cfloop>
> </cfloop>
> 
> <CFDUMP var="#update_file#">
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to