Page 1 of 1

Question about Index (Tag) Command

Posted: Fri Nov 11, 2005 5:21 am
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.

Re: Question about Index (Tag) Command

Posted: Fri Nov 11, 2005 9:25 am
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.

Add Tag Statement to Index

Posted: Fri Nov 11, 2005 8:20 pm
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.