I need to read a value from an Oracle database and the field has been declared as Number(38). How can I do this in C# since the Decimal type isn’t big enough?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could call
GetString(ordinal)on the data reader, and feed the result toSystem.Numerics.BigInteger.TryParse().Or perhaps you could leave the value in the
OracleDecimaldatatype, like you received it from ODP.NET.OracleDecimalhas functions for almost everything, including math:Mulitply,Round,Exp, and so on.