Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
| Search | Today's Posts | Mark Forums Read
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP 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
  #1 (permalink)  
Old February 28th, 2007, 02:29 PM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default decimal data type all 0's after decimal

Hello I am tring to insert a rwo with a decimal value. All the numbers after the decimal end in 0's though.

cmdQry.Parameters.Add(new SqlParameter("@Size", SqlDbType.Decimal));
cmdQry.Parameters[cmdQry.Parameters.Count - 1].Value = Convert.ToDecimal(this.thesize);

where thesize is instantiated as a float.

i want the row to have a value of 14.67888, but it stores it as 14.00000

the column's data type in Sql server is decimal(18,5).

Any ideas of what is causing this?

  #2 (permalink)  
Old February 28th, 2007, 02:32 PM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind I feel like an idiot, I didn't have decimal type set in my SPROC.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql error for decimal type input parameter suru_07 ADO.NET 0 November 27th, 2007 12:45 AM
Scaling of decimal value resulted in data truncati rupen Access 6 June 2nd, 2007 08:31 AM
decimal harpua Beginning PHP 1 November 3rd, 2005 10:17 PM
C# - Decimal to Single type Conversions ubayeed C# 1 December 22nd, 2004 08:48 PM





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