an MS Access (yeah, I know) column of type "Number:Long Integer."
When I hard code in a number instead of pulling it from the database, the
problem goes away. If I change the code so that the number is retrieved
from a struct, 1D array, or 2D array, the problem does not occur.
So I'm thinking the problem may have to do with either the database or ODBC.
Any thoughts?
Again, thanks in advance.
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
> -----Original Message-----
> From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 05, 2004 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: RE: "Invalid Parameter Type" Error message - When is a number
> not a number?
>
>
> Cameron:
>
> Thanks for the suggestion but adding the code you suggested
> (i.e., Trim() and Val()) didn't change the situation. I'm
> getting the exact same error message.
>
> So, now I added the following check above the CFPARAM tag:
> <CFOUTPUT>
> #IsNumeric(OrganizationID)#<BR><BR>
> </CFOUTPUT>
>
> And it's saying "YES". So, CF is seeing it as numeric until it
> gets to the CFPARAM tag which is on the very next line. I'm
> stumped. Anyone?
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 942-5378
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
>
> -----Original Message-----
> From: Cameron Childress [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 05, 2004 12:30 PM
> To: CF-Talk
> Subject: RE: "Invalid Parameter Type" Error message - When is a
> number not a number?
>
>
> CFMX will throw that type error for CFPARAMs if:
>
> 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]

