title: C# Inserting a new Requirement in HP Quality Center - AccessViolationException
body: <p>Trying to create a prototype application that will post a new Requirement to HPQC 11.</p>
  
  <p>I've managed to get a solid connection but when I attempt to add the blank requirement I get an AccessViolationException.</p>
  
  <pre><code>TDConnectionClass td = HPQC_Connect(); //Open a connection
  ReqFactory myReqFactory = (ReqFactory)td.ReqFactory; //Start up the Requirments Factory.
  Req myReq = (Req)myReqFactory.AddItem(DBNull.Value); //Create a new blank requirement (AccessViolationException)
  myReq.Name = "New Requirement"; //Populate Name
  myReq.TypeId = "1"; // Populate Type: 0=Business, 1=Folder, 2=Functional, 3=Group, 4=Testing
  myReq.ParentId = 0; // Populate Parent ID
  myReq.Post(); // Submit
  </code></pre>
  
  <p>Any ideas? I'm fairly new to C# and coding in general, so it's probably best to assume I know nothing.</p>