I have a SQL statement that is easier to build and save as a variable but it 
throws an error when I do this:

<cfset strSQL2 = "INSERT INTO users(userName) VALUES('andrew')">
<cfquery name="insert" datasource="#DSN#">
        #strSQL2#
</cfquery>

The error says it is trying to insert the values with two '':
SQL: INSERT INTO users(userName) VALUES(''andrew'')

If I put the SQL code into the CFQUERY tag it is fine. 

Why is this and can I fix it? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317533
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to