we have a value in our database that is numeric we take through the database and then we want to insert it to another value but we want it to be converted to DOUBLE from Numeric
So any ideas how can we convert our Numeric variable to double ?
edit
Database = Microsoft SQL Server Database File (SqlClient) (.mdf)
double point = 0;
cn.Open();
point = Convert.ToDouble("select bounty from provider where sirname = '" + globals2.stringena + "' ");
cn.close();
bounty = Numeric(18,2)
so want to pass this value to my point variable.
The error i get is
Input string was not in a correct format.
decimal
value todouble
: you can useConvert.ToDouble
. Is your question really "How do I retrieve a value from the database?"? – hvd 15 hours ago