Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!