title: Oracle Insert query
body: <p>I am getting this error "ORA-01722: illegal/invalid number"</p>
  
  <pre><code>            decimal first2var = Convert.ToDecimal(var1);
              decimal id_refeicao;
  
              //...
              // save values in var insted of lables
              decimal id_usuario = (decimal)dr.GetInt32(0);
              //...
              var idUsuarioParameter = new OracleParameter
              {
                  ParameterName = "id_usuario",
                  OracleDbType = OracleDbType.Decimal,
                  Direction = ParameterDirection.Input,
                  Value = id_usuario
              };
              var idRefeicaoParameter = new OracleParameter
              {
                  ParameterName = "id_refeicao",
                  OracleDbType = OracleDbType.Decimal,
                  Direction = ParameterDirection.Input,
                  Value = id_refeicao
              };
              var var1Parameter = new OracleParameter
              {
                  ParameterName = "first2var",
                  OracleDbType = OracleDbType.Decimal, //-- populate with correct oracle type
                  Direction = ParameterDirection.Input,
                  Value = first2var
              };
                  OracleConnection connection = new OracleConnection(oradb);
                  connection.Open();
                  cmd.Connection = connection;
                  cmd.CommandText = "INSERT INTO SER_REFEICAO_USUARIO (USUARIO, REFEICAO, DATA_HORA, ORIGEM ) VALUES(:id_usuario, :id_refeicao, SYSDATE , :first2var )";
                  cmd.Parameters.Add(idUsuarioParameter);
                  cmd.Parameters.Add(idRefeicaoParameter);
                  cmd.Parameters.Add(var1Parameter);
                  cmd.CommandType = CommandType.Text;
                  cmd.ExecuteNonQuery();
                  connection.Close();
  </code></pre>
  
  <p>Can anyone help me what i am doing wrong here, if i hard code my values in my insert query, it works fine but if i pass the parameters as above so i got the error.</p>