Page 1 of 1

Multiple Sql Indexes - Rao

Posted: Tue May 30, 2023 6:39 pm
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 ?

Re: Multiple Sql Indexes - Rao

Posted: Tue May 30, 2023 6:56 pm
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

Re: Multiple Sql Indexes - Rao

Posted: Tue May 30, 2023 7:32 pm
by Rick Lipkin
Rao

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