Click here to Skip to main content
15,914,488 members
Home / Discussions / Database
   

Database

 
AnswerRe: Sql query find the primary key ,foreign key relationship between tables Pin
Paul Conrad14-Jul-07 7:16
professionalPaul Conrad14-Jul-07 7:16 
AnswerRe: Sql query find the primary key ,foreign key relationship between tables Pin
Colin Angus Mackay14-Jul-07 10:28
Colin Angus Mackay14-Jul-07 10:28 
GeneralRe: Sql query find the primary key ,foreign key relationship between tables Pin
Paul Conrad14-Jul-07 10:50
professionalPaul Conrad14-Jul-07 10:50 
QuestionSystem.OverflowException for large Decimal value Pin
Uwe Keim13-Jul-07 23:35
sitebuilderUwe Keim13-Jul-07 23:35 
AnswerRe: System.OverflowException for large Decimal value [modified] Pin
Mike Dimmick14-Jul-07 5:51
Mike Dimmick14-Jul-07 5:51 
GeneralRe: System.OverflowException for large Decimal value Pin
Uwe Keim14-Jul-07 5:55
sitebuilderUwe Keim14-Jul-07 5:55 
GeneralRe: System.OverflowException for large Decimal value Pin
Uwe Keim14-Jul-07 6:47
sitebuilderUwe Keim14-Jul-07 6:47 
GeneralRe: System.OverflowException for large Decimal value Pin
Mike Dimmick14-Jul-07 8:30
Mike Dimmick14-Jul-07 8:30 
Both of those are losing significant digits. double uses binary floating point notation - the exponent is expressed internally as a power of two. 11 bits are used for the exponent and 52 for the mantissa (the actual significant digits), the final bit being used for the sign. The largest mantissa that can be represented is 2^52 - 1 which is 4,503,599,627,370,495, effectively 15 significant decimal digits. For more on double, see IEEE-754 on Wikipedia[^] and What Every Computer Scientist Should Know About Floating-Point Arithmetic[^]. Since the position of the decimal point is represented as a binary exponent, only negative powers of two and sums of negative powers of two can be represented. Everything else is rounded. For example, consider 1/3 in decimal (0.3333 recurring) which can never be truly represented.

The decimal value only has 17 digits after the decimal point. It's kept the magnitude correct at the expense of losing the final 0. You can only get 28 whole significant digits with this format - your database definition has 38. SqlDecimal supports the same range that SQL Server does.

Stability. What an interesting concept. -- Chris Maunder

GeneralRe: System.OverflowException for large Decimal value Pin
Uwe Keim14-Jul-07 8:36
sitebuilderUwe Keim14-Jul-07 8:36 
GeneralRe: System.OverflowException for large Decimal value Pin
Mike Dimmick14-Jul-07 8:54
Mike Dimmick14-Jul-07 8:54 
GeneralRe: System.OverflowException for large Decimal value Pin
Uwe Keim14-Jul-07 8:57
sitebuilderUwe Keim14-Jul-07 8:57 
GeneralRe: System.OverflowException for large Decimal value Pin
Uwe Keim14-Jul-07 20:15
sitebuilderUwe Keim14-Jul-07 20:15 
Questionusing datagrid in vb.net Pin
Rharzkie13-Jul-07 23:16
Rharzkie13-Jul-07 23:16 
AnswerRe: using datagrid in vb.net Pin
Manas Bhardwaj14-Jul-07 4:49
professionalManas Bhardwaj14-Jul-07 4:49 
GeneralRe: using datagrid in vb.net [modified] Pin
Rharzkie14-Jul-07 20:23
Rharzkie14-Jul-07 20:23 
AnswerRe: using datagrid in vb.net Pin
TomGarth15-Jul-07 9:05
TomGarth15-Jul-07 9:05 
Questionrecover a database in sql 2005 server Pin
prasadbuddhika13-Jul-07 22:54
prasadbuddhika13-Jul-07 22:54 
AnswerRe: recover a database in sql 2005 server Pin
Mike Dimmick14-Jul-07 5:53
Mike Dimmick14-Jul-07 5:53 
QuestionHelp for select statement Pin
Prakash_Mishra13-Jul-07 22:29
Prakash_Mishra13-Jul-07 22:29 
AnswerRe: Help for select statement Pin
kubben14-Jul-07 1:22
kubben14-Jul-07 1:22 
GeneralRe: Help for select statement Pin
Prakash_Mishra14-Jul-07 1:37
Prakash_Mishra14-Jul-07 1:37 
AnswerRe: Help for select statement Pin
Arun.Immanuel14-Jul-07 2:37
Arun.Immanuel14-Jul-07 2:37 
QuestionInsert Pin
pmartike13-Jul-07 21:09
pmartike13-Jul-07 21:09 
AnswerRe: Insert Pin
pmartike13-Jul-07 22:17
pmartike13-Jul-07 22:17 
QuestionClassic ASP and MS SQL Express Edition Pin
Fayu13-Jul-07 6:06
Fayu13-Jul-07 6:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.