Creating ADO Objects

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

The ActiveX Data Objects (ADO) API provides the Connection, Command, and Recordset objects for accessing and manipulating data from the OLE DB Provider for Indexing Service. Of these objects, an Indexing Service application typically uses just the Recordset object to represent the set of records resulting from a query submitted using the Query Helper API (see Creating Query Helper Objects).

The following table shows how to declare a Recordset object with either early or late binding.

Object Early Binding Late Binding
Recordset
Dim objRecordset as ADODB.Recordset
Or
Reference to ADODB Type Library
Dim objRecordset as Object

 

You subsequently can use either of the following statements to create the Recordset object.

Set objRecordset = New ADODB.Recordset
Set objRecordset = objQuery.CreateRecordset("ADODB.Recordset")