"PWD=<MyPassword>;" & _\r
"Database=<MyDatabaseName>"\r
\r
+ 'Clear the table\r
+ cn.Execute "DELETE FROM vbtest;"\r
+ \r
'For updateable recordsets we would typically open a Dynamic recordset.\r
'Forward Only recordsets are much faster but can only scroll forward and \r
'are read only. Snapshot recordsets are read only, but scroll in both \r
'directions. \r
- rs.Open "SELECT id, data FROM vbtest", cn, adOpenDynamic\r
+ rs.Open "SELECT id, data, accessed FROM vbtest", cn, adOpenDynamic, adLockOptimistic\r
\r
'Loop though the recordset and print the results\r
'We will also update the accessed column, but this time access it through \r
cn.Execute "INSERT INTO vbtest (id, data) VALUES (23, 'Some random data');"\r
\r
'Refresh the recordset to get that last record...\r
- rs.Refresh\r
+ rs.Requery\r
\r
'Get the record count\r
rs.MoveLast\r
</p>\r
\r
</body>\r
-</html>
\ No newline at end of file
+</html>\r