Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think that the main difference between the raw COM Recordset and the one provided by the .Net wrapper classes is just that some things get renamed. It is simply a wrapper around the underlying COM object and not a new class in its own right.</p> <p>To answer your immediate example, try</p> <pre><code>RS-&gt;default-&gt;Append(...); </code></pre> <p>You could try to run ILDASM over the adodb.dll you have to see what the API on the recordset class is. </p> <p>You can do the following too:</p> <pre><code>//Create instance of a recordset ADODB::RecordsetClass^ recordset; recordset = gcnew ADODB::RecordsetClass(); //Set some options recordset-&gt;CursorLocation = ADODB::CursorLocationEnum::adUseClient ; recordset-&gt;CursorType = ADODB::CursorTypeEnum::adOpenDynamic; recordset-&gt;LockType = ADODB::LockTypeEnum::adLockBatchOptimistic; //Add columns recordset-&gt;default-&gt;Append("Name", ADODB::DataTypeEnum::adWChar, 50, ADODB::FieldAttributeEnum::adFldFixed, nullptr); recordset-&gt;default-&gt;Append("Number", ADODB::DataTypeEnum::adWChar, 20, ADODB::FieldAttributeEnum::adFldFixed, nullptr); //Build an array of field names fields = gcnew array&lt;Object^&gt;(2); fields[0] = gcnew String("Name"); fields[1] = gcnew String("Number"); //Add values array&lt;Object^&gt;^ values = gcnew array&lt;Object^&gt;(2); values [0] = "some name"; values [1] = 1.2; recordset-&gt;AddNew(fields, values); //Get a value out again recordset-&gt;MoveFirst(); ADODB::Field^ pNum= recordset-&gt;default[1]; double num = Convert::ToDouble((pNum-&gt;default)); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload