Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How to fill a MaskedTexBox with money data type from ACCESS

$
0
0

Hi, i want to fill a MaskedTexBox with a money value provideed from
a OleDbCommand to a ACCESS file.

My problem is when  do:

 maskedTextBoxPrecio.Mask = "9,990.00";
  maskedTextBoxPrecio.Text = string.Format({0:#,##0.00}",Convert.ToDouble(reader["Precio"]));
 the MaskedTexBox show me: [35,0_.__]
but if i do the same with a normal TextBox

textBoxPrecio.Text = string.Format("{0:#,##0.00}", Convert.ToDouble(reader["Precio"]));

it show me what that i want [3.50]

whats i wrong ?
The CurrentCulture.NumberFormat.CurrencyDecimalSeparator
and the NumberDecimalSeparator are setting to point.

Also how make the conversion to load the value in the table

cmd.Parameters.AddWithValue("@Precio", WHAT WRITE HERE);

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>