title: Instructing ADODB Recordset to use SQL Server current timestamp
body: <p>I am attempting to write a number of records back to the database from a VB6 application using ADO. The records were read in from the database into an <code>ADODB.Recordset</code> and subsequently updated. I would like to be able to have each record in the set use the current date and time of the database server because I have no confidence that all our machines are time-synchronized. Is there a way to do this without having to query the database for <code>CURRENT_TIMESTAMP</code> (or something similar)? Ideally I'm hoping for some sort of flag that I can set the field value to so that the <code>Recordset</code> works this out on the database server.</p>
  
  <p>See the question in my prototype code below (within the while-loop).</p>
  
  <pre><code>Dim oConn As ADODB.Connection
  Dim oRs As ADODB.Recordset
  Dim sSQL As String
  Dim sColumnName1 As String: sColumnName1 = "UserNID"
  Dim sColumnName2 As String: sColumnName2 = "Username"
  Dim sColumnName3 As String: sColumnName3 = "LastLoginDTM"
  
  ' Open a connection.
  Set oConn = New ADODB.Connection
  oConn.Open 'my connection string was here
  
  ' Make a query over the connection.
  sSQL = "SELECT TOP 10 " &amp; sColumnName1 &amp; ", " &amp; sColumnName2 &amp; ", " &amp; sColumnName3 &amp; " " &amp; _
         "FROM theTable"
  
  Set oRs = New ADODB.Recordset
  oRs.CursorLocation = adUseClient
  oRs.Open sSQL, oConn, adOpenStatic, adLockBatchOptimistic, adCmdText
  oRs.MoveFirst
  
  While Not oRs.EOF
      oRs.Fields(sColumnName3).Value = '-=-=-=-=-What do I put here???-=-=-=-=-
      oRs.MoveNext
  Wend
  
  ' Close the connection.
  oConn.Close
  Set oConn = Nothing
  </code></pre>