title: Inexact character conversion during translation
body: <p>I face the following error frequently ,when i try to authenticate users  :</p>
  
  <pre><code>ERROR [HY000] [Informix .NET provider]Inexact character conversion during translation.
  </code></pre>
  
  <hr>
  
  <pre><code> public static int IsValidPortalUser(string p_u, string p_p)
          {
              int ret = 0;
              using (IfxConnection conn = new IfxConnection(connectionString))
              {
                  IfxCommand DBCmd = new IfxCommand();
                  String p = My_Decryption_2(p_p);
                  try
                  {
                      if (conn.State == ConnectionState.Closed)
                          conn.Open();
                      DBCmd = new IfxCommand();
                      DBCmd.Connection = conn;
                      DBCmd.CommandText = "SELECT nvl(emp_num,0) FROM emp_mas_queue WHERE username = ? AND DECRYPT_CHAR(password, 'XXXXXX') = ? ";
                      DBCmd.Parameters.Add("user_name", p_u);
                      DBCmd.Parameters.Add("password", p);
                      using (IfxDataReader dataReader = DBCmd.ExecuteReader())
                      {
                          if (dataReader.Read())
                          {
                              if (dataReader[0] != null &amp;&amp; !string.IsNullOrEmpty(dataReader[0].ToString()))
                              {
                                  ret = int.Parse(dataReader[0].ToString());
                              }
                          }
                          dataReader.Close();
  
                      }
                  }
                  catch (ThreadAbortException e)
                  {
  
                  }
                  catch (ApplicationException e)
                  {
  
                  }
                  conn.Close();
  
                  return ret;
              }
          }
  </code></pre>