Treat it as two lists. The first using Chr(13) or Chr(10) as a delimiter, the second using ",":
<cfset CSV = CSVFileData> <cfloop index="idx" List="#CSV#" delimiters="#chr(13)#"> <cfset Firstcolumn = ListGetAt(idx,1)> <cfset SecondColumn = ListGetAt(idx,2)> .... Continue for all columns and validate Insert into DB here </cfloop> each loop of idx will provide the next row of data to be inserted. >Hi. I want to enable the user to upload a csv file, then the data >should be validated against pre-defined criteria for different columns >in the csv file. Once that is done, I want to write the validated >rows from the csv file to the DB. > >Please help. > >Thanks, >Ken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Protect your mail server with built in anti-virus protection. It's not only good for you, it's good for everybody. http://www.houseoffusion.com/banners/view.cfm?bannerid=39 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189859 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

