multi-field indexes?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an index on 3 fields. It is a multi-field index and I'd like
to use it to access records in the database. However, I need help with the
query.
Is there a select statement that can be used?

My index name is idxPrimary
Do I do something like Select * from MyTable where idxPrimary = ?????

If so, I'm not sure what the ????? is. I need some help with this.

I'm actually writing some VB to access the database, and originally tried to
code it but all the examples were for using DAO and since I'm using ADO, I
never was able to figure out how to properly do it. So I gave up and through
that I'd try just entering the Select statement to access the database using
the multi-field index.

Any knowledge on this out there?
 
Access automatically uses figures out the indexes to use. You can't control
this, but it is very good at it.

It will use the multi-field index if you provide criteria on the first in
the index, and the criteria does not begin with a wildcard. After that, it
will be able to handle criteria on the 2nd field as well. However, if you
did not specify criteria on the first field, the criteria on the 2nd field
cannot use this index.

Rushmore is the tradmarked name of the optimization techniques in Access,
from version 2 onwards. MS originally bought it form Fox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top