Multiple Sql Indexes - Rao

Multiple Sql Indexes - Rao

Postby Rick Lipkin » Tue May 30, 2023 6:39 pm

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
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Multiple Sql Indexes - Rao

Postby nageswaragunupudi » Tue May 30, 2023 6:56 pm

We do not need to create indexes at all.
Just set order to the column name we want like this:
Code: Select all  Expand view  RUN
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
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Multiple Sql Indexes - Rao

Postby Rick Lipkin » Tue May 30, 2023 7:32 pm

Rao

Brilliant ... been working on this RUSH project .. Thank You, Rick
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests