FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour generating index on the fly?
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
generating index on the fly?
Posted: Sun Sep 09, 2007 11:08 AM

Hi,

I have a database opened in shared mode and indexed. I can´t close the database or the index.

I would like to add a new index on the fly, do a report, and restore the original index, but I can´t close either the database or index.

There must be:

openfile()
....

doreport()

function openfile()

select 1

use test index test shared new

select 2

use other index other shared new

function doreport()

select 1

saveoriginalindex()

createnewindexonthefly()

report

restoreoriginalindex()

I have tried set index &tempind additive and OrdSetFocus( 1), but always uses the new temp index, not the original one that I must restore.

How can I do it?. Thanks a milion!!!!!!!!!!!!!!!!!!!!!

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: generating index on the fly?
Posted: Sun Sep 09, 2007 11:20 AM

The easier way might be to open your original table in a new area with a different alias.

EMG

Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
generating index on the fly?
Posted: Sun Sep 09, 2007 12:07 PM

Yes, you were right!!!!. Thanks a lot!!!!!!!

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40

Continue the discussion