Board index » delphi » Add a secondary index to a database in runtime

Add a secondary index to a database in runtime

How to add a secondary index to a database in Runtime ? The base is a Paradox
V7.0, and has already 1 primary and 2 secondary keys. We already tried some
stuff, at first view the index is added, but not created ? Thanks

Wim Vanmaele

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:Add a secondary index to a database in runtime


There are two ways to add secondary indexes.

1. Use SQL:      create index LastNameFirstName
                            on NameList(LastName, FirstName, ClubID)

                        CREATE INDEX [IndexName]
                            ON [TableName]([Field1, Field1...])

2.  Use the TTable method:
    Table1.AddIndex('NewIndex', 'CustNo;CustName', [ixUnique,
        ixCaseInsensitive]);

-------------------------------------------------------------------------------------

Quote
wim...@my-dejanews.com wrote:
> How to add a secondary index to a database in Runtime ? The base is a Paradox
> V7.0, and has already 1 primary and 2 secondary keys. We already tried some
> stuff, at first view the index is added, but not created ? Thanks

> Wim Vanmaele

> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Other Threads