Using SEEK on a TADODataSet

From: Brian Wheatley (brianpw_at_neo.rr.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 11:12:36 -0400

Hello,

I have an application with a TADOConnection and a TADODataSet on a data
module form. The TADOConnection is connection to a MS SQL Server database,
and the TADODataSet's CommandText property is as follows:

SELECT * FROM CAPACITY

The CAPACITY table has a primary key on a MODEL_NO field, and a secondary
index IX_MODEL on MODEL (not MODEL_NO) and CAPACITY fields.

The documentation for the SEEK method states that the index name must be
set. However, the index names do not appear in the design environment. I can
type in IX_MODEL but the SEEK method still does not work. I also tried
setting the IndexFields property to MODEL;CAPACITY but that did not work
either.

The table will open and I can edit the data using a db grid, I just can't
get the SEEK method to work.

Can anyone tell me exactly what I need to do, step by step, to use the seek
method?

Thank you,
Brian Wheatley