title: ADO: Opening a recordset to add new record
body: <p>In this example the only reason I am opening a recordset is to allow me to INSERT a record into the table using ADO .addNew method.</p>
  
  <p>Are there memory implications that would make it better to open a recordset with just one record rather than opening a table that might possibly have thousands of rows?</p>
  
  <p>Code example:</p>
  
  <pre><code>//Create a recordset object
  var rs = Server.CreateObject("ADODB.Recordset");
  
  // Select just the top record to increase efficiency ?????  
  var mySource = "SELECT TOP 1 * FROM MyThousandRecordTable";
  
  // OR...
  
  // The whole table
  var mySource = "MyThousandRecordTable";
  
  rs.Open(mySource, adoConnection, adOpenKeyset, adLockPessimistic);
  
  rs.AddNew
  
  //loop fields dynamically and assign values
  for (var key in model){
      val = [some code that gets a value]
      rs.Fields(key) = val+"";
  }
  
  rs.Update    
  //clean up
  rs.Close();
  rs = null;
  </code></pre>
  
  <p>Does opening just the top row save resources and affect efficiency?</p>
  
  <p>I guess the basic question I am asking here is - does using the tablename instead of a SELECT query load the entire table into memory?</p>