hello all
I hope there someone to help ,to point what mistake i have done ,thank you
the error message is
ex.Message = "Incorrect decimal value: '4000000,00' for column 'Jumlah' at row 1"
denny
My code always automatically add ",00" at the end of decimal jmldec (only if ccstr=="id-ID")
here is my code:
string ccstr=CultureInfo.CurrentCulture.Name;
if (ccstr == "id-ID")
{
jmldec = decimal.Parse(tbjumlah.Text, CultureInfo.GetCultureInfo("id-ID"));
}
if (ccstr == "en-US")
{
jmldec = decimal.Parse(tbjumlah.Text);// there is no addition ",00" here
}
string insert = "insert into TblKwitansi(No,Nama,Jumlah)values('" + tbNo.Text + "','" + tbnama.Text + "','" + jmldec + "')";//but here jmldec is added automatically with ",00"
MySqlCommand cmdinsert = new MySqlCommand(insert, conn);
conn.Open();
int iint = cmdinsert.ExecuteNonQuery();
conn.Close();
if (iint == 1)
{
MessageBox.Show("done", "info");
}