Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

214
Vistas
How to change decimal separator in C# for OdbcConnection

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;          

        }
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda