Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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?

Reply With Quote
  #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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.