title: C# MySqlParameter problem
body: <p>(int) faultsGroup  is 0 or 1 but i always get this error: Column 'FaultGroup' cannot be null</p>
  
  <p>Does anyone tell me why? Syntax looks ok.</p>
  
  <pre><code>MySqlCommand cmdAdd = new MySqlCommand("INSERT INTO Faults (" +
          "  FaultGroup, Text, Date, IP" +
          ") VALUES (" +
          "  @FaultGroup, @Text, @Date, @IP" +
          ")", conn);
  
  MySqlParameter paramFaultGroup = new MySqlParameter("@FaultGroup", MySqlDbType.Int32);
  FaultsGroup faultsGroup = (FaultsGroup) Enum.Parse(typeof (FaultsGroup), myFault.FaultGroup);
  paramFaultGroup.Value = (int) faultsGroup;
  cmdAdd.Parameters.Add(paramFaultGroup);
  
  cmdAdd.ExecuteNonQuery();
  </code></pre>