2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by thines01
0

I first cast it to a string, then to a double and it worked:

using(SqlConnection conn = new SqlConnection(CDB_SqlLister.csb.ToString()))
         {
            conn.Open();

            string strSQL = "SELECT * from E.dbo.has_money";
            using (SqlDataReader rdr = (new SqlCommand(strSQL, conn)).ExecuteReader())
            {
               while (rdr.Read())
               {
                  Console.WriteLine(double.Parse(rdr["mnyOne"].ToString()));
               }

               rdr.Close();
            }

            conn.Close();
         }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.