Reading SQL server Numeric data type into a C# variable
Posted on 2006-07-01
- a Microsoft SQLServer database.
- a table named _Tab containing:
- 1 column, named Value, assigned a Numeric data type
- 1 row of data, 9998887777
I'd like to:
My main goal is to read that Numeric data into an integer or something that will NOT spit out a scientific notation.
I want to read it into an Int or something so that if i print that value to a screen after its read into a variable, it will
still be 9998887777. Not 1+0E878748 or whatever.
I know how to set up the sqldatareader and how to loop through to read the data, what i do not know is how to cast the value properly so it comes in without errors or changes.
Thanks so much for the help.