Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

remove quotation mark

$
0
0

My error:

Error Executing Database Query.

Field 'Association' doesn't have a default value
The error occurred in D:/home/manpcs.com/wwwroot/Untitled_cfm.cfm: line 11
9 : 10 :  VALUES 11 : ('#listgetAt(index,1 )#') 12 : 13 : </cfquery> 

sqlState  HY000
datasource  pcs
vendorErrorCode  1364
sql   INSERT INTO property (Amenities) VALUES ('"BO1F')

My Code:

<cffile action="read"file="http://website.com/testtmk.csv" variable="datacsv">

 

 

 

 

<cfloop index="index" list="#datacsv#" delimiters= "#chr(10)##chr(13)#" >

<cfquery datasource="X" username="Y" password="Z" timeout="90">

INSERT INTO property

   (Amenities)

VALUES

   ('#listgetAt(index,1 )#')

</cfquery>

</cfloop>

 

I am pulling from a CSV file.  Some of the data in one cell is seperated by comas, I also seem to be picking up some extra " marks.  Any help is appreciated.


Viewing all articles
Browse latest Browse all 5794

Trending Articles



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