Are you positive that the datatype in the database for that field is
really "int"? Could it be different in the two environments (which I
assume have different db servers)?
Mark
-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2007 2:07 PM
To: CF-Talk
Subject: Odd cfqueryparam issue
I'm getting an odd error when using <cfqueryparam>. I've got the type
set to "cf_sql_integer" - the value I'm passing is an integer (even
throwing "Int()" into the mix - and yet, I'm getting the error:
[Macromedia][SQLServer JDBC Driver]Value can not be converted to
requested type.
However, when I remove the <cfqueryparam> and just throw in the raw
variable, i.e. "var = #Int(myNumericVariable)#", it works fine.
Throwing in some debugger code to check the variable being passed into
the script, the length is fine, it passes the IsNumeric() check,
everything.
It gets better!
The same code (with the cfqueryparam call) on my development box works
fine. It's on my production box that it hiccups.
On top of that, there's another query right after, that's very similar -
using a cfqueryparam set for integer, but using a different passed in
variable - and it works fine.
Both boxes are running CF8 - though there are differences - dev box is
still running Win 2k server, and had CF upgraded - while the production
box is new, running fresh installs (no upgrades) of Win 2k3 server and
CF8.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289978
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4