title: Oracle SQL Insert/ Visual Studio 2010 C# error
body: <p>I am trying to add a new record into the database. </p>
  
  <p>The code was initially</p>
  
  <pre><code>rsGroup.Open(ftSQL, Global.gADOConnection, false);
  rsGroup.AddNew();
  
  rsGroup["PANELIST_NUM"] = flPanelistNum;
  rsGroup["USER_CREATED"] = Global.glUserNumberID;
  </code></pre>
  
  <p>With the initial error happening on the rsGroup.AddNew() being - Column PANELIST_NUM does not allow nulls.<br>
  This is because it is the Primary Key.</p>
  
  <p>To fix this I tried to use an insert method-</p>
  
  <pre><code>strInsert1 = "INSERT INTO PANELIST_HEADER (PANELIST_NUM, USER_CREATED) VALUES (" + flPanelistNumber + "," + Global.glUserNumberID + ")";
  
  System.Data.OracleClient.OracleCommand cmdCommand = new
  System.Data.OracleClient.OracleCommand();
  
  cmdCommand.CommandText = strInsert1;
  cmdCommand.Connection = Global.gADOConnection;
  cmdCommand.ExecuteNonQuery();
  </code></pre>
  
  <p>When I run this I do not get an error but it goes on in an infinite loop and never makes it to the next line of code after the ExecuteNonQuery Command. Is there a reason why it is stuck in a loop and/or is there another way for me to successfully add this record to the database?</p>