Question about Index (Tag) Command

Question about Index (Tag) Command

Postby J-Bohanan » Fri Nov 11, 2005 5:21 am

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.
J-Bohanan
 
Posts: 23
Joined: Wed Oct 26, 2005 11:26 pm
Location: Knoxville, TN (USA)

Re: Question about Index (Tag) Command

Postby Antonio Linares » Fri Nov 11, 2005 9:25 am

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  Expand view
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  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Add Tag Statement to Index

Postby J-Bohanan » Fri Nov 11, 2005 8:20 pm

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.
J-Bohanan
 
Posts: 23
Joined: Wed Oct 26, 2005 11:26 pm
Location: Knoxville, TN (USA)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests