May I ask what this tag does? It looks like mabye you've created a generic custom tag that will run any query you pass it?? If so, I'd suggest you simply set a global datasource variable and use that in your CFQUERY tags and drop your custom tag...then you can properly include your queries when needed and re-use them in multiple places (and of course use cfqueryparam)
HTH
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: Daniel Farmer
To: CF-Talk
Sent: Thursday, January 22, 2004 10:56 AM
Subject: Re: some errors...
How could I integrate cfqueryparam in the following statement?
<cfset thesql="update data set data = '', data_f = '#form.EditorDefault2#' where nav_id = #form.nav_id#">
<cfmodule template = "../dbaccess_code/dbaccess.cfm" sql="#thesql#" qname="getit">
----- Original Message -----
From: Bryan Stevenson
To: CF-Talk
Sent: Thursday, January 22, 2004 1:40 PM
Subject: Re: some errors...
<cfquery....>
SELECT *
FROM MyTable
WHERE ID = <cvfqueryparam value="#MyIDVar#" cfsqltype="cf_sql_integer">
</cfquery>
Cheers ;-)
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: Daniel Farmer
To: CF-Talk
Sent: Thursday, January 22, 2004 10:30 AM
Subject: Re: some errors...
this is a variable.
----- Original Message -----
From: Jochem van Dieten
To: CF-Talk
Sent: Thursday, January 22, 2004 1:24 PM
Subject: Re: some errors...
Daniel Farmer said:
> Here's my code... I've never used this tag before... not sure
> exactly how it's used... I'm using some custom tags with this
> setup... so basically the html code is being sent to this query
> template via the attributes.sql. Am I using the tag correctly?
> <cfquery name="caller.#attributes.qname#"
> datasource="#dadatasource#">
> <cfqueryparam value="#attributes.sql#">
> </cfquery>
You can't put a complete statement in a cfqueryparam, only variables:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b20.htm
Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]