1) You specify a type in the CFPARAM
2) The variable is defined above the CFPARAM
3) The value of the variable doesn't match the datatype of the CFPARAM
For some reason, CF doesn't think that data is numeric. Perhaps there is
some whitespace around it? Have you tried wrapping the var in trim or val
to see if that helps? Try this and see what happens:
<cfset OrganizationID = val(trim(OrganizationID)) >
<cfoutput>#OrganizationID #</cfoutput>
<cfparam NAME="OrganizationID" TYPE="Numeric">
-Cameron
-----------------
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
land: 858.509.3098
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED]
-----Original Message-----
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]
Sent: Monday, April 05, 2004 9:24 AM
To: CF-Talk
Subject: "Invalid Parameter Type" Error message - When is a number not a
number?
All:
I've just run into an error on one of my clients sites. The site was
recently moved from a CF5 server to a CFMX Enterprise 6.1 server. All of a
sudden, we're encountering the following error message:
Invalid parameter type. The value cannot be converted to a numeric because
it is not a simple value.Simple values are booleans, numbers, strings, and
date-time values. <br>The error occurred on line 17.
The line of code in question is:
<CFPARAM NAME="OrganizationID" TYPE="Numeric">
Removing the above line of code results in the same error message as a
result of a CFQUERYPARAM tag with a CFSQLTYPE of "CF_SQL_NUMERIC".
I put some code before the CFPARAM to email me the current value of
OrganizationID and it came back as a number (332). Any ideas?
Thanks in advance.
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

