Re: Inserting a query string into a text field

2004-08-17 Thread Bryan Stevenson
post the code plz ;-) Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com [Todays Threads] [This Message] [Subscription] [Fast

RE: Inserting a query string into a text field

2004-08-17 Thread Scott Stewart
Stevenson [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 2:44 PM To: CF-Talk Subject: Re: Inserting a query string into a text field post the code plz ;-) Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell

RE: Inserting a query string into a text field

2004-08-17 Thread Mosh Teitelbaum
So long as the query is enclosed in quotes and properly escaped, you shouldn't have any problems.Something like: CFSET sql = SELECT foo FROM bar WHERE baz = 'yadda' CFQUERY NAME=InsertSQL DATASOURCE=#ds# INSERT INTO foo ( sqlCode ) VALUES ( '#Replace(sql, ', '', ALL)#' )

RE: Inserting a query string into a text field

2004-08-17 Thread Bryan Love
PreserveSingleQuotes causes CF to NOT escape the single quotes in your text string.Since the your text string has single quotes in it that need to be inserted into the DB, then you need to let CF escape them or the query will err out. INSERT INTO tbl_CampaignMgrActionData (ActionString) VALUES

RE: Inserting a query string into a text field

2004-08-17 Thread Bryan Love
PreserveSingleQuotes causes CF to NOT escape the single quotes in your text string.Since the your text string has single quotes in it that need to be inserted into the DB, then you need to let CF escape them or the query will err out.In other words, don't use PreserveSingleQuotes - let CF

Re: Inserting a query string into a text field

2004-08-17 Thread Qasim Rasheed
shouldn't you be using an update instead of insert? - Original Message - From: Scott Stewart [EMAIL PROTECTED] Date: Tue, 17 Aug 2004 15:49:19 -0400 Subject: RE: Inserting a query string into a text field To: CF-Talk [EMAIL PROTECTED] Here's the CF Code cfquery name

Re: Inserting a query string into a text field

2004-08-17 Thread Doug James
cfquery name=qry_insertQueryString datasource=#application.dsn# INSERT INTO tbl_CampaignMgrActionData (ActionString) VALUES (cfqueryparam value=#monstor_query# cfsqltype=CF_SQL_VARCHAR) WHERE tbl_CampaignMgrActionData.ActionID = #session.ActionID# /cfquery Doug Scott Stewart wrote:

Re: Inserting a query string into a text field

2004-08-17 Thread Ewok
INSERT with a WHERE?? Did you mean to do an UPDATE? - Original Message - From: Doug James To: CF-Talk Sent: Tuesday, August 17, 2004 4:06 PM Subject: Re: Inserting a query string into a text field cfquery name=qry_insertQueryString datasource=#application.dsn# INSERT

Re: Inserting a query string into a text field

2004-08-17 Thread Joe Rinehart
Hi Scott, Off the top of my head, try using cfqueryparam to pass in your SQL code. -joe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]