I've never tried to embed the CFSET inside the CFQUERY before.  I don't know
if that would work.  What error messages are you getting?

Oh, I see you are using FORM.pattern_name AND pattern_name, ie different
scopes.  That may be the problem.

I'd do it like this:

<CFSET pattern_name = replace(pattern_name, '"', '&quot;', 'all')>

<cfquery name="AddPattern" datasource="dbcms" dbtype="ODBC">
INSERT INTO tblpatterns
        (pattern_name, 
        pattern_num,
        pattern_price,
        pattern_cat,
        pattern_pic,
        pattern_des)
VALUES
        ('#pattern_name#',
        '#Form.pattern_num#',
        '#Form.pattern_price#',
        #Form.pattern_cat#,
        '#Form.pattern_pic#',
        '#Form.pattern_des#')
</cfquery>

What fun,
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-----Original Message-----
From: Michael Wilson [mailto:[EMAIL PROTECTED]]

Hi,

Thanks for taking time to try and help me with this stuff.. but ( and you
knew it was coming didn't you?) I still can't get it to work correctly.

This is what I have on my action page as per your instructions.

<CFSET pattern_name = replace(pattern_name, '"', '&quot;', 'all')>

<cfquery name="AddPattern" datasource="dbcms" dbtype="ODBC">
INSERT INTO tblpatterns <CFSET pattern_name = replace(pattern_name, '"',
'&quot;', 'all')> (pattern_name, pattern_num, pattern_price, pattern_cat,
pattern_pic, pattern_des)
VALUES
('#Form.pattern_name#','#Form.pattern_num#','#Form.pattern_price#',#Form.pat
tern_cat#,'#Form.pattern_pic#','#Form.pattern_des#')
</cfquery>


<html>...


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to