On Apr 23, 10:03 am, patrick <patrick_doho...@[EMAIL PROTECTED]
> wrote:
> (Codebase newbie)
>
> I am trying to create an index tag on an existing Fox dbf file:
> ICITEM05.DBF. ICITEM05 .DBF has a current CDX index file associated
> to it.
>
> Here's the code, using the DefineTag function:
> tblIcitem.Close;
> tblIcitem.Exclusive := exTrue;
> tblIcitem.Open;
> tblIcitem.DefineTag('ItemTag', 'ITEM', '', False, False);
>
> the valid expression: 'ITEM' is a valid field in the ICITEM05.DBF
> file.
>
> What am I doing wrong?
>
> TIA--patrick
I solved this myself. Here's the code:
tblIcitem.Close;
tblIcitem.Exclusive := exTrue;
tblIcitem.Open;
tblIcitem.DefineIndexStart;
tblIcitem.DefineTag('AvgCost', 'str(avgcost,15,5)', '', False,
False);
tblIcitem.CreateIndex('ICITEM05b.CDX');
tblIcitem.Close;
--patrick


|