• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Creating DBase Expression Index

I'm developing an application using DBase IV type file.

I'm trying to create a DBase Expression Index programmatically. i.e.:

given Table1 (tipas.dbf) with fields NUMBER (string) and NAME (string), how to create an index like "NUMBER+NAME" (using a DBase expression)
0
markspiner
Asked:
markspiner
1 Solution
 
victor_christovCommented:
Hi Markspiner

Try this :

 with table1 do begin
  AddIndex('MyIndex','Number+Name',[ixExpression]);
  IndexName := 'MyIndex';
 end;

if index already exist, you have to delete it or only assign it to IndexName.

Regards, Victor

0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now