I am trying to use SqlDataReader to read a Decimal(10,2) from a MSSQL database into a formatted string like 8.80.
SqlDataReader reader = cmd.ExecuteReader();
xxx = reader["xxx"] //???
I tried several ways but always got 8.00 instead of 8.80. And I can confirm the data in database is 8.80.
Could anyone tell me how to do this? Thanks.
Edit: Thanks for your time. It turns out that I mistype in my code. Every way I tried actually works well....