Restartable Property and Requery Method Example (VC++)

This example determines the Restartable property setting of a dynaset-type Recordset and then uses the Requery method on the Recordset.

CdbDBEngine      dbeng;
CdbDatabase      dbsNorthwind;
CdbRecordset   rstChangeOften;

dbsNorthwind = dbeng.OpenDatabase(_T("Northwind.mdb"));

rstChangeOften = dbsNorthwind.OpenRecordset(_T("Table That Changes 
Often"),dbOpenDynaset);
if (rstChangeOften.GetRestartable())
   rstChangeOften.Requery();
dbsNorthwind.Close();