title: Unit Testing of a WCF method with ADODB.Recordset as input parameter
body: <p>I have a WCF service that is a facade for a VB application. My VB application expects an ADODB.Recordset as my input parameter.
  I have written an unit test for this method but i don't know how to manually create a recordset for testing purposes.</p>
  
  <p>I came up with this (after long searches on the web) :</p>
  
  <pre><code>ADODB.Recordset tempRS = new ADODB.Recordset();
  tempRS.Fields.Append("Field1", ADODB.DataTypeEnum.adChar);  
  tempRS.Fields.Append("Field2", ADODB.DataTypeEnum.adInteger);
  </code></pre>
  
  <p>but this recordset does not have data in it. Or another try :</p>
  
  <pre><code>ADODB.Recordset temp = new ADODB.Recordset();
  temp.Open();
  temp.AddNew("Field1", "data for field 1");
  temp.AddNew("Field2", "1");
  </code></pre>
  
  <p>but i get an error on the <code>temp.Open()</code> statement saying <code>The connection cannot be used to perform this operation. It is either closed or invalid in this context.</code></p>
  
  <p>Can someone point me in the right direction ? I have read on <code>msdn</code> but didn't find an example that suits my needs.</p>
  
  <p>Thanks in advance !</p>