creating secondary index in paradox table at runtime?? 
Author Message
 creating secondary index in paradox table at runtime??

Hi Gregory,

try the TTable.AddIndex function

Hope this helps

Andreas


Quote:

>i am trying (i stress trying) to provide a data export feature in a
>program.  the problem lies in creating the secondary indexes required by
>the other software package.  i can create the table, the key, and pump in
>the data, but the secondary index definition remains a mystery.  any clues
>would be appreciated.

>thanx

>gregory liss
>applied technologies software engineer


--
=============================================
helicon software development - Andreas Prucha

===Sorry, no kangaroos - Schnitzel instead===


Sat, 20 Feb 1999 03:00:00 GMT  
 creating secondary index in paradox table at runtime??

i am trying (i stress trying) to provide a data export feature in a
program.  the problem lies in creating the secondary indexes required by
the other software package.  i can create the table, the key, and pump in
the data, but the secondary index definition remains a mystery.  any clues
would be appreciated.

thanx

gregory liss
applied technologies software engineer



Sat, 20 Feb 1999 03:00:00 GMT  
 creating secondary index in paradox table at runtime??

Quote:

> i am trying (i stress trying) to provide a data export feature in a
> program.  the problem lies in creating the secondary indexes required by
> the other software package.  i can create the table, the key, and pump in
> the data, but the secondary index definition remains a mystery.  any clues
> would be appreciated.

> thanx

I recently discovered that with Paradox tables, secondary indexes must
have the same name as the field that you're indexing on. So, if your
field is 'LASTNAME', the secondary index must also be 'LASTNAME'.
Probably not a problem if you're using the Database Desktop/Explorer.
However, I was creating my tables and indexes at run-time, as you
indicate.

Hope this helps.

Brent DeShazer



Sun, 21 Feb 1999 03:00:00 GMT  
 creating secondary index in paradox table at runtime??

"I recently discovered that with Paradox tables, secondary indexes must
have the same name as the field that you're indexing on"

Whoa!  I don't think this is true.

To answer the original question: use AddIndex.  For example,

Say Table1 has fields named Code, Product, Price, Surname, FirstName,
Date1, Date2

and the primary index is on Code.

To create a secondary index use:

procedure AddAnIndex;
var MyIndexName, FieldList:string; Options: TIndexOptions;
begin
MyIndexName:= 'AnyNameYouLike';
FieldList:='Surname;FirstName'; {for DBase use: FieldList:='Surname +
FirstName';}
Options:= []; {for a DBase expression index use: Options:= [ixExpression];}
Table1.AddIndex(MyIndexName, FieldList, Options);
end;

{TIndexOptions = set of (ixPrimary, ixUnique, ixDescending,
ixCaseInsensitive, ixExpression);}

--
Paul Motyer  17:31 Thurs, 5th September, 1996 EST

SoftStuff, Croydon, Vic,  Australia, 3136.


Quote:

> > i am trying (i stress trying) to provide a data export feature in a
> > program.  the problem lies in creating the secondary indexes required
by
> > the other software package.  i can create the table, the key, and pump
in
> > the data, but the secondary index definition remains a mystery.  any
clues
> > would be appreciated.

> > thanx

> I recently discovered that with Paradox tables, secondary indexes must
> have the same name as the field that you're indexing on. So, if your
> field is 'LASTNAME', the secondary index must also be 'LASTNAME'.
> Probably not a problem if you're using the Database Desktop/Explorer.
> However, I was creating my tables and indexes at run-time, as you
> indicate.

> Hope this helps.

> Brent DeShazer



Mon, 22 Feb 1999 03:00:00 GMT  
 creating secondary index in paradox table at runtime??

Thanks to all who posted answers to this problem.  I was working on the
same thing and was unsuccessful until I saw this thread.

Melody  :-)

Quote:


> > i am trying (i stress trying) to provide a data export feature in a
> > program.  the problem lies in creating the secondary indexes required by
> > the other software package.  i can create the table, the key, and pump in
> > the data, but the secondary index definition remains a mystery.  any clues
> > would be appreciated.

> > thanx

> I recently discovered that with Paradox tables, secondary indexes must
> have the same name as the field that you're indexing on. So, if your
> field is 'LASTNAME', the secondary index must also be 'LASTNAME'.
> Probably not a problem if you're using the Database Desktop/Explorer.
> However, I was creating my tables and indexes at run-time, as you
> indicate.

> Hope this helps.

> Brent DeShazer



Mon, 22 Feb 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Creating secondary indexes ay runtime...

2. Creating Secondary Indexes at Runtime, Help...

3. Creating secondary index during runtime

4. How to create secondary indexes at runtime?

5. Create Paradox Secondary Index on the fly?

6. paradox7 tables-creating secondary index without primary

7. Secondary Unique Indexes for paradox tables???

8. Cannot access secondary indexes in Delphi Paradox table

9. Getting or creating indexes for an unknown dBASE or Paradox database at runtime

10. Creating Index on Paradox at Runtime

11. Help: Creating indexes on tables at runtime

12. Add a secondary index to a database in runtime

 

 
Powered by phpBB® Forum Software