Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2007, 12:45 AM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sql error for decimal type input parameter

I am getting following error while executing the stored proc using command object ExecuteNonQuery method.
"Error converting data type int to decimal."
In stored proc one of the input parameters defined is type of decimal(4,4). E.g. @ADD_ON_PCT decimal(4,4)
For this Input parameter we have a sql parameter defined and added to the SQLparameter collection of Command object.
The SQlDBType of this parameter is Decimal and the value we are setting through the business object which has property of type decimal.
E.g businessobject.ADD_ON_PCT =10.0M; ADD_ON_PCT type of decimal.
I tried with the following parameters directly in query analyzer still I am getting the same above error.
exec USP_SAV_PRC_RULE 'SCW',
'PO',10,'0','Admin',
'7/30/2007 2:32:55 PM','A','7/30/2007 2:32:55 PM','Admin'
10 is the value defined for . @ADD_ON_PCT decimal(4,4)parameter.
Please let me know what is the problem with the decimal type input parameter in stored proc which has precision of 4 and scale = 4.







Similar Threads
Thread Thread Starter Forum Replies Last Post
decimal data type all 0's after decimal gobotsoup SQL Server ASP 1 February 28th, 2007 02:32 PM
C# - Decimal to Single type Conversions ubayeed C# 1 December 22nd, 2004 08:48 PM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.