Indeces .ntx, multi tag

104 views
Skip to first unread message

Luigi Ferraris

unread,
Sep 29, 2022, 1:06:41 PM9/29/22
to Harbour Users
Hi folks,
about ntx file

1) Q. about ORDCONDSET function, property <lAdditive>: it's only affects while ORDCREATE execution?

2) Q. I need to recreate all orders (multi tags) in an order bag.
If there was a tag, now unused, I need to manually remove it or is there a way to remove all tags before using ORDCREATE? e.g. ORDBAGCLEAR()

Many thanks in advance.
Luigi

Luigi Ferraris

unread,
Sep 30, 2022, 12:21:50 PM9/30/22
to Harbour Users
Hi to everyone,

I found that using next code (as example), the index file (physical file) is automatically removed.
I don't know this behaviour.

   ic := 1
   WHILE( ! EMPTY( (warea)->(ordName( ic )) ) )
      (warea)->(ordDestroy((warea)->(ordName( ic ))))
   ENDDO


Best regards.

AL67

unread,
Oct 3, 2022, 6:09:30 AM10/3/22
to Harbour Users
czwartek, 29 września 2022 o 19:06:41 UTC+2 Luigi Ferraris napisał(a):
Hi folks,
about ntx file

1) Q. about ORDCONDSET function, property <lAdditive>: it's only affects while ORDCREATE execution?
Normal INDEX ON ...  close all current used index files (BAG) , create new and use only this new file index. ADDITIVE no close used indexes
Sample.
INDEX ON keyA TO indA        //opened indexes:  indA
INDEX ON keyB TO indB        //opened indexes:  indB  
INDEX ON keyC TO indC  ADDITIVE      //opened indexes:  indB , indC
for mulit tag:
INDEX ON keyA TAG aa TO indA        //opened indexes:  indA->aa
INDEX ON keyB TAG bb TO indA        //opened indexes:  indA->aa,bb
INDEX ON keyC TAG cc TO indB        //opened indexes:  indB->cc
INDEX ON keyD TAG dd TO indA  ADDITIVE    //open indexes:  indB->cc , indA->aa,bb,dd


2) Q. I need to recreate all orders (multi tags) in an order bag.
If there was a tag, now unused, I need to manually remove it or is there a way to remove all tags before using ORDCREATE? e.g. ORDBAGCLEAR()
If You use to recrate:  INDEX ON ... TAG .. TO indFile         simply delete file "indFile.ntx"
if REINDEX     use before command:  DELETE TAG <(tag1)> [IN <(bag1)>] [, <(tagN)> [IN <(bagN)>]]  for unused tags


Adam
Reply all
Reply to author
Forward
0 new messages