From: Patrice on 24 Mar 2010 12:56 > I need to update this value in database in numeric datatype. > The .tostring() methods also returns the value in exponent form only. A best practice is to used parameters rather than using a string inside a SQL statement : - you'll be less sensitive to SQL injection attacks - you could have the same problem with the decimal separator and dates and even strings (if the string includes a ' character). See : http://msdn.microsoft.com/en-us/library/yy6y35y8.aspx The key thing to realize is that you almost never see the real value. A date and even a decimal value are allways shown according to a text representation that depends on the country etc... Using parameters takes care of "transporting" the value under a culture insensitive format. Else you have to do this job yourself... -- Patrice
First
|
Prev
|
Pages: 1 2 Prev: Can be done? Next: Configure Properties of Windows User (Terminal Server Eviroment) |