Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 June 2nd, 2004, 09:25 AM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default rounding up SqlDbType.Money TYPE in sql server

when i use the type Money in sql server is there a way to round up the zeros???
SqlDbType.Money


rrr
__________________
rrr
 
Old June 2nd, 2004, 10:57 AM
Authorized User
 
Join Date: Nov 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I assume you mean you want to change the string presentation - the default is 4 decimal places, since that is the absolute resolution of the money type. You need to perform your own string conversion if you want a different outcome - e.g. either use STR() function in SQL, or use something like ToString("d2") in .net.

brian

brian
 
Old December 9th, 2005, 04:46 PM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to demiwolf
Default

The convert() function with VARCHAR in sqlserver is easier to use, btw.






Similar Threads
Thread Thread Starter Forum Replies Last Post
working with money values in sql server mattastic SQL Server 2000 3 September 29th, 2005 08:15 PM
what data type in sql server kiwibey SQL Server 2000 3 November 22nd, 2004 11:05 PM
geting money type from sql msrnivas Classic ASP Components 1 July 19th, 2004 11:09 AM
geting money type from sql msrnivas .NET Web Services 1 July 19th, 2004 06:36 AM





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