It's a "Numeric" data type in MS-SQL 2000, and the one (major) fault I've
had with cfqueryparam is the lack of documentation for which cfsqltype to
use with which data type from each different db vendor. (i.e.: if you use a
datetime or smalldatetime data type in MS-SQL, you must use CF_SQL_TIMESTAMP
in your cfsqltype attribute, not the more obvious CF_SQL_DATE) So I've
always resorted to the table in Forta's WACK for CF5, which subsequently has
disappeared in later versions(?).  And that table tells me I should use
CF_SQL_NUMERIC OR CF_SQL_DECIMAL for numeric data types in MS-SQL...and that
is where I am at now: I insert 0.0001273148154723458, and it is set as a 0
(zero) in the db->

Tyler

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 4:12 PM
To: CF-Talk
Subject: Re: Query Param numeric type?

First off...what's the datatype in SQL Server?

Then make sure you use the proper cfsqltype in your cfqueryparam

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: "Tyler Silcox" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 8:55 AM
Subject: Query Param numeric type?


> I'm trying to put a Numeric data type into a MS-SQL db with 
> cfqueryparam
and
> I can't get CF to put anything but a 0 in the field...
>
>
> When I do this in my query:
>
> <cfqueryparam cfsqltype="CF_SQL_NUMERIC" value="#Duration#">
>
>
> I can see (w/ debugging turned on) that CF is receiving everything
> correctly:
>
> (Datasource=whatever, Time=0ms, Records=0) in C:\whatever.cfm @
11:47:08.008
>
> UPDATE StatsViews
>
> SET Duration = ?
>
> WHERE StatsView_id = ?
>
>
> Query Parameter Value(s) -
> Parameter #1(CF_SQL_NUMERIC) = 0.0001273148154723458 Parameter 
> #2(CF_SQL_INTEGER) = 48
>
>
> But when I hit the database and pull the value out, either through EM 
> or a cfquery, I get a big fat zero back.  Is this a bug?  Has it been 
> fixed in 6.1?  Has anyone else come across this? Please, help a 
> brother out...TIA->
>
> Tyler
>
> P.S.: and of course it works correctly if I take out the cfqueryparam 
> field...
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to