I am trying to read some decimal values from my DB. These values are the order of 10-6. I am trying to read it into a double variable in C# using code like this: sqltype in database is "float". sample value to be read is "1.99999999495049E-06" –
Double [] rmseValues = null;
while (dataReader.Read())
{
// This shows my datatype is float (sql)
string temp = dataReader.GetDataTypeName(0);
// This returns a value of "0"
string temp1 = dataReader.GetOrdinal("RmseAll").ToString();
// This throws exception of invalid typecast
rmseValues[0] = dataReader.GetFloat(0);
}
decimalhere... what is the sql type in the database, and what does the value represent?GetDouble