MDAC 2.5 SDK - OLE DB Providers
Cursor Service for OLE DB


 

Data Fetching Using the Cursor Service

When the consumer requests functionality that requires the Cursor Service, the Cursor Service component is invoked to fetch the data and cache it locally. The data is stored in memory buffers and, if needed, written to temporary files on disk. The data fetch can be performed synchronously or asynchronously.

The following ADO code example shows how to invoke the Cursor Service by loading a new recordset with data fetched from the database:

Private Sub OpenRs_Click()
   Dim rs As New adodb.Recordset
   Dim cn As New adodb.Connection
   
   rs.CursorLocation = adUseClient       'invokes the Cursor Service
   rs.Open "select * from authors", 
   "provider=sqloledb;server=dbsrv1;database=pubs;uid=sa;pwd=;", 
   adOpenStatic, adLockBatchOptimistic
End Sub