Multiple Sql Indexes - Rao

Post Reply
User avatar
Rick Lipkin
Posts: 2668
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Multiple Sql Indexes - Rao

Post by Rick Lipkin »

I have a single Sql table oRs and I want to have 2 lookup options or Sql indexes on the same recordset .. This dataset is for a local town park where you have information on Owners ( name ) and pets by name .

I want to be able to have a single recordset where I can use a radio option to search on either an owner name or a pet name without having to re-create the same recordset ordered by OwnerName and or by Pet name ..

Like in dbfcdx .. you create a .dbf with two tags and you can on the fly set order to ownername or petname .. is this possible in ADO Sql ?
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Multiple Sql Indexes - Rao

Post by nageswaragunupudi »

We do not need to create indexes at all.
Just set order to the column name we want like this:

Code: Select all | Expand

oRs:Sort := "OwnerName"
// or
oRs:Sort := "PetName"
Or use the default AUTOSORT clause of Xbrowse and use Incremental search
Regards

G. N. Rao.
Hyderabad, India
User avatar
Rick Lipkin
Posts: 2668
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Multiple Sql Indexes - Rao

Post by Rick Lipkin »

Rao

Brilliant ... been working on this RUSH project .. Thank You, Rick
Post Reply