Microsoft KB Archive/258580

= SAMPLE: Seek.exe Demonstrates How to Use IRowsetIndex Methods Seek, SetRange, and GetIndexInfo =

Article ID: 258580

Article Last Modified on 8/9/2004

-

APPLIES TO


 * Microsoft OLE DB Provider for Jet 4.0

-



This article was previously published under Q258580



SUMMARY
Seek.exe is a sample that demonstrates how you can use the Seek, SetRange, and GetIndexInfo methods of the IRowsetIndex interface. Note that this interface is currently only supported by the Jet 4.0 OLE DB provider when it is used with a Microsoft Access 2000 database, and will not work with an earlier version of Access.

To use this sample, you must install Microsoft Visual C++ 6.0 Service Pack 3 because the OLE DB headers that were included with previous versions did not define the IRowsetIndex interface.

This sample uses two accessors: an accessor that you can use with index searches, and another one to retrieve data from the Jet database. In your application, you can use the same accessor for index searching and data retrieval.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

Seek.exe

Release Date: May 24, 2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Seek.exe contains the following files:

You can follow these steps to run this sample:
 * 1) Open the workspace file (Seek.dsw) in Microsoft Visual C++ 6.0 and compile it.
 * 2) This sample uses the NWIND.MDB (Northwind database) that is provided with Microsoft Access. Make sure that the format of this database is Access 2000. Modify the path for DBPROP_INIT_DATASOURCE in the function GetDataSourcePropSet to point to your Northwind database.
 * 3) Compile and run the program to see a list of names in the console application.

NOTE: The debug version of this program will output any encountered messages to the output window.

