How to change decimal separator in decimal in mnoz_obj item the value I recieve is 24.500 and I need to change it to 24,500. The value is recieved from url and I need to store them to database as decimal. One way is to change it when creating URL but I would like to make it in this function.
public static string updStavPolozka(decimal mnoz_vyd, int prac, int pvp06pk)
{
var dbCon = ConfigurationManager.ConnectionStrings["myConn"].ConnectionString;
string retMessage = "";
using (var cn = new OdbcConnection(dbCon))
{
try
{
OdbcCommand cmd = cn.CreateCommand();
cmd.CommandText = "UPDATE tableA SET mnoz_vyd = ?, prac = ?, stav = 2 WHERE pvp06pk = ?";
cmd.Parameters.Add("@mnoz_vyd", OdbcType.Decimal).Value = mnoz_vyd;
cmd.Parameters.Add("@prac", OdbcType.Int).Value = prac;
cmd.Parameters.Add("@pvp06pk", OdbcType.Int).Value = pvp06pk;
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
retMessage = "OK";
}
catch (Exception e)
{
retMessage = e.Message;
}
}
return retMessage;
}