Question about Index (Tag) Command

Post Reply
J-Bohanan
Posts: 23
Joined: Wed Oct 26, 2005 11:26 pm
Location: Knoxville, TN (USA)

Question about Index (Tag) Command

Post by J-Bohanan »

I was looking at the New (x)Harbour and Fivewin for Harbour Version
2.6. Can you not set a Tag for a CDX index file in your Index Statement.

I was also wanting to use the tDatabase Command and the
Define Database Command from the

#Include "Database.ch" file.

But i don't see a way to set the Order list from inside the Class
for the Index. I don't see a TAG option on the Index Command
for the tDatabase Class? I looked that the tIndex Class and
was able to see that one of the Option in the program had the
tag option added to the Index Command.

But when I try to use it I get a error Message that it not resagins.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Question about Index (Tag) Command

Post by Antonio Linares »

J-Bohanan wrote:Can you not set a Tag for a CDX index file in your Index Statement.
This is a sample:

Code: Select all

INDEX ON Name + StrZero( Order, 3 ) TAG "Name+Ord" ;
        TO ( cPath + "\DataBase" ) FOR ! DataBases->( Deleted() )
J-Bohanan wrote:I was also wanting to use the tDatabase Command...But i don't see a way to set the Order list from inside the Class for the Index. I don't see a TAG option on the Index Command
for the tDatabase Class?
All these methods from Class TDataBase let you manage Tags:

Code: Select all

METHOD CreateIndex( cFile, cTag, cKey, bKey, lUnique) INLINE ;
          ( ::nArea )->( OrdCreate( cFile, cTag, cKey, bKey, lUnique ) )

   METHOD AddIndex( cFile, cTag ) INLINE ( ::nArea )->( OrdListAdd( cFile, cTag ) )

   METHOD DeleteIndex( cTag, cFile ) INLINE ( ::nArea )->( OrdDestroy( cTag, cFile ) )

   METHOD IndexKey( ncTag, cFile )   INLINE ( ::nArea )->( OrdKey( ncTag, cFile ) )
   METHOD IndexName( nTag, cFile )   INLINE ( ::nArea )->( OrdName( nTag, cFile ) )
   METHOD IndexBagName( nInd )       INLINE ( ::nArea )->( OrdBagName( nInd ) )
   METHOD IndexOrder( cTag, cFile )  INLINE ( ::nArea )->( OrdNumber( cTag, cFile ) )
Don't use Class TIndex. Just use Class TDataBase.
regards, saludos

Antonio Linares
www.fivetechsoft.com
J-Bohanan
Posts: 23
Joined: Wed Oct 26, 2005 11:26 pm
Location: Knoxville, TN (USA)

Add Tag Statement to Index

Post by J-Bohanan »

I have tryed to use the Code:

INDEX On Name TAG "Name+Ord" To (cPath+"\Database")

But the TAG will not Work I received a Error Message on
The TAG Statement added to the Index Command.
Post Reply