-----Original Message-----
From: Greg Luce [mailto:[EMAIL PROTECTED]
Sent: Monday, July 05, 2004 10:25 AM
To: CF-Talk
Subject: RE: Havent seen this error before...
Wow, I didn't understand what you just said Mark. But my understanding is
that you don't need single quotes inside the cfqueryparam. Specifying the
cfsqltype should take care of that for you right?
Greg
-----Original Message-----
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
Sent: Monday, July 05, 2004 10:44 AM
To: CF-Talk
Subject: RE: Havent seen this error before...
Greg,
I don't believe that is correct. The purpose of the single quotes is to
identify character data. cfqueryparam makes them
unnecessary by specifying the data type in advance. In this case using a
datatype binding (cfqueryparam) means the
single quotes would be superflous. the driver creates a query with a
placeholder that says "character data here" - then
whatever you pass in as the variable is bound to that type. Adding single
quotes would only result having them suddenly
appear in the database as a part of the string. There is a bug with a hot
fix (fixed permanently in cfmx 6.1 I believe)
that causes single quotes that included as a part of the param to be doubled
up - but that's not the issue here either.
-Mark
-----Original Message-----
From: Greg Luce [mailto:[EMAIL PROTECTED]
Sent: Monday, July 05, 2004 9:28 AM
To: CF-Talk
Subject: RE: Havent seen this error before...
I don't believe you need those single-quotes inside cfqueryparam. But show
more code and I'm sure we'll be able to tell you what's wrong. Show us the
whole query at least.
Greg
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 05, 2004 10:09 AM
To: CF-Talk
Subject: Re: Havent seen this error before...
Looks like you are missing a set of single quotes in your value attribute.
Instead of this,
45 : set txtBoutCat = <cfqueryparam
cfsqltype="cf_sql_varchar"
value="#instance.category#" null="#yesnoformat(not len(trim
(instance.category)))#">,
try this:
45 : set txtBoutCat = <cfqueryparam
cfsqltype="cf_sql_varchar"
value="'#instance.category#'" null="#yesnoformat(not len(trim
(instance.category)))#">,
[EMAIL PROTECTED]
ets.com
To
2004-07-05 09:50 CF-Talk <[EMAIL PROTECTED]>
cc
Please respond to Subject
[EMAIL PROTECTED] Re: Havent seen this error
sion.com before...
Sorry, HOF cut off some of the message (formatting from CFs error stuff)
I am now getting an odd error:
Error Executing Database Query.
Unknown Types value
The error occurred in /home/httpd/[omitted]/system/cfcomponents/com/
[omitted]/boutique/category.cfc: line 43
Called from /home/httpd/[omitted]/secure/editor/_cat.cfm: line 205
Called from /home/httpd/[omitted]/secure/editor/main.cfm: line 114
Called from /home/httpd/[omitted]/system/cfcomponents/com/
[omitted]/boutique/category.cfc: line 43
Called from /home/httpd/[omitted]/secure/editor/_cat.cfm: line 205
Called from /home/httpd/[omitted]/secure/editor/main.cfm: line 114
41 :
42 : <cffunction name="update" access="public" output="false"
returntype="boolean">
43 : <cfquery name="cat" datasource="#application.config.DSN#">
44 : update tblboutcat2
45 : set txtBoutCat = <cfqueryparam
cfsqltype="cf_sql_varchar"
value="#instance.category#" null="#yesnoformat(not len(trim
(instance.category)))#">,
--
SQL update tblboutcat2 set txtBoutCat = (param 1) , blActive = (param
2)
where intBoutCatID = (param 3)
DATASOURCE [omitted]
SQLSTATE S1000
Anybody ever seen this one before? This function is nearly identical to
one
in
another CFC that I currently have running which works perfectly (different
table and fields). I've double checked that there are values to my
'instance'
vars, that I have the sqltypes set correctly, etc. And I still can't
figure
it
out. Help....
Cutter
Quoting JediHomer <[EMAIL PROTECTED]>:
> Whats the other code around that, as I notice you end with a comma but
> no more code is shown.
>
> Might help to scope your vars, so add something like
>
> <CFSET VAR Cat = "">
>
> after the <CFFUNCTION
>
> or ommit the name of the CFQUERY if its not going to return anything.
> Potentially pass the datasource in as an argument rather than trying
> to access the Application scope
>
> HTH
>
> Mike
>
>
> ----- Original Message -----
> From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Mon, 5 Jul 2004 08:55:50 -0400
> Subject: Havent seen this error before...
> To: CF-Talk <[EMAIL PROTECTED]>
>
> I am now getting an odd error:
>
>
> Error Executing Database Query.
> Unknown Types value
>
> 42 : <cffunction name="update" access="public" output="false"
>
> returntype="boolean">
>
> 43 : <cfquery name="cat" datasource="#application.config.DSN#">
>
> 44 : update tblboutcat2
>
> 45 : set txtBoutCat = <cfqueryparam cfsqltype
="cf_sql_varchar"
>
> value="#instance.category#" null="#yesnoformat(not len(trim
>
> (instance.category)))#">,
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

