I'm running a loop over a csv with five columns in order to update an
Access Table - when I run it, nothing appears to happen - it doesn't update
the table, but it doesnt give me an error message... as though it's not
finding any matches on the table even though they do exist...
What's wrong with this code?
<cfset delims=",">
<cfset numcols="5">
<!--- read the file -->
<cffile
action=read
file="c:\inetpub\wwwroot\briona\secure\modernstorage\shop\control\Test.csv"
filefield="file">
<cfloop list="#filefield#" index="line" delimiters="#chr(10)##chr(13)#">
<!--- loop through the columns -->
<cfloop from="1" to="#numcols#" index="num">
<cfquery name="update_file" datasource="#EComDB#">
UPDATE Products
SET Series = '#listgetAt('#line#',2, '#delims#')#"',
SeriesDescription = '#listgetAt('#line#',3, '#delims#')#"',
JPG = '#listgetAt('#line#',4, '#delims#')#"',
PDF = '#listgetAt('#line#',5, '#delims#')#"'
where (MFGPartNumber = '#listgetAt('#line#',1, '#delims#')#"')
</cfquery>
</cfloop>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4