Thursday, June 30, 2005

I remember having this problem when upgrading from Studio 2002/Framework 1.0 to Studio 2003/Framework 1.1. All of a sudden, our decimal types no longer had the trailing zeros removed when populating values from a database.

I'd forgotten how I originally fixed this, so my first attempt this time was

dr.GetDecimal(1).ToString().Trim('0')

Unfortunately, this doesn't work as a 0 value will be effectively set to a zero length string. Further investigation led me to the following site

http://blogs.msdn.com/bclteam/archive/2004/06/01/145468.aspx

The answer is

dr.GetDecimal(1).ToString("G29")

 

Thursday, June 30, 2005 7:59:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Wednesday, June 22, 2005

http://www.codezone.org.uk

This site is run by Microsoft for UK developers. I've set my page up here

http://www.codezone.org.uk/DetailPage.Codezone?GUID=369394fa-71e9-471e-bffc-61525099d579

Will be interested to see how the site develops as it matures

 

Wednesday, June 22, 2005 4:16:33 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Small titbits covering MS technology
 |  | 
Wednesday, June 22, 2005 3:44:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Quick test using Visual Studio Hosted experience
Wednesday, June 22, 2005 8:08:23 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Tuesday, June 21, 2005
Haven't got the hardware to play with the new Microsoft toys?
 |  | 
Tuesday, June 21, 2005 5:42:10 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
900 bytes limit
Tuesday, June 21, 2005 5:10:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Friday, June 17, 2005
Useful reference
 |  | 
Friday, June 17, 2005 5:43:04 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
For June 2005 CTP
 | 
Friday, June 17, 2005 4:50:53 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Remove unwanted server functionality
Friday, June 17, 2005 8:23:34 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Framework 1.1 SP1 on Win 2003 machine
Friday, June 17, 2005 8:04:15 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Thursday, June 16, 2005
Takes MS certification to a new level
Thursday, June 16, 2005 4:50:40 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Over 1 million tpmC on the TPC-C benchmark
 | 
Thursday, June 16, 2005 3:54:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Tuesday, June 14, 2005
New patch management offerings from MS
Tuesday, June 14, 2005 5:00:55 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: