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.
The
following file is available for download from the Microsoft Download
Center:
Seek.exe
(http://download.microsoft.com/download/ole/sample/1/win98/en-us/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Â
(http://kbalertz.com/Feedback.aspx?kbNumber=119591/EN-US/
)
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:
Collapse this tableExpand this table
| File | Size |
|---|
| Accessor.h | 1 KB |
| MsJetOleDb.h | 12 KB |
| Seek.cpp | 11 KB |
| Seek.dsp | 5 KB |
| Seek.dsw | 1 KB |
| StdAfx.cpp | 1 KB |
| StdAfx.h | 1 KB |
You can follow these steps to run this sample:
- Open the workspace file (Seek.dsw) in Microsoft Visual C++
6.0 and compile it.
- 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.
- 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.
For additional information on how you can use the Seek
method, click the article number below to view the article in the Microsoft
Knowledge Base:
258576Â
(http://kbalertz.com/Feedback.aspx?kbNumber=258576/EN-US/
)
Limitations of IRowsetIndex::Seek() Used with Jet database