Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 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 March 25th, 2005, 06:47 PM
Authorized User
 
Join Date: Oct 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.Data.SqlTypes bug?

I am trying to build one part of my app to round as if SQL server was rounding, and I am using this line of code:

Public Function Round(value as Decimal) as Decimal
     Return Decimal.Parse(System.Data.SqlTypes.SqlDecimal.Roun d( _
          System.Data.SqlTypes.SqlDecimal.Parse(value.ToStri ng),2).ToString)
End Function
And I send this number : 233.3305 and it returns 233.34. That's NOT RIGHT!! Is there anything I'm missing?

"A spirit with a vision is a dream with a mission"
__________________
\"A spirit with a vision is a dream with a mission\"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug or no to bug learning C using VS.Net to compil tesh All Other Wrox Books 0 February 14th, 2007 01:06 PM
System.Data.OleDb.OleDbException: No value given f tjgrindsted ASP.NET 2.0 Basics 0 January 24th, 2007 07:25 AM
System Data Types liamfitz Beginning VB 6 0 October 17th, 2006 05:31 PM
Need Help in System.Data.SQL vavre ADO.NET 2 August 24th, 2003 10:28 AM
'System.Data.ConstraintException' - HELP PLEASE AlanBell ADO.NET 1 July 1st, 2003 02:23 AM





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