Board index » delphi » create permanent index for interbase table using Delphi3

create permanent index for interbase table using Delphi3

Does anyone know how to create index for interbase table using Delphi3?

Thanks

Ming

 

Re:create permanent index for interbase table using Delphi3


Take a TQuery Component and insert into the property sql
the
CREATE TRIGGER <triggername> FOR <tablename>(<col1>,...)

Statement

Then use the method ExecSql.

bye
On 15 Sep 1998 02:09:06 GMT, "Ming Pun" <m...@pointcast.com> wrote:

Quote

>Does anyone know how to create index for interbase table using Delphi3?

>Thanks

>Ming

Re:create permanent index for interbase table using Delphi3


If you are creating the table use the Add method of the TIndexDefs

with Table1.IndexDefs do
begin
         clear;
         add('Primary','TDay;Unit;UnitID;HE',[ixPrimary,ixUnique]);
end;

If you are adding indices to existing tables use the Table Object's AddIndex
method.

--
Michael Glatz
mgl...@briefcase.com

Quote
Ming Pun wrote in message <01bde04d$fe42b490$e920dbd0@mpun>...

>Does anyone know how to create index for interbase table using Delphi3?

>Thanks

>Ming

Re:create permanent index for interbase table using Delphi3


On 15 Sep 1998 02:09:06 GMT, "Ming Pun" <m...@pointcast.com> wrote:

Quote
>Does anyone know how to create index for interbase table using Delphi3?

In addition to the TTable-oriented suggestion someone else posted, there is
SQL. InterBase supports the CREATE INDEX statement. For example:

  CREATE INDEX IndexName ON TblName (Column1, Column2)

You could execute this from a TQuery (TQuery.ExecSQL method).

//////////////////////////////////////////////////////////////////////////
Steve Koterski                      "The knowledge of the world is only to
Technical Publications              be acquired in the world, and not in a
INPRISE Corporation                 closet."
http://www.inprise.com/delphi          -- Earl of Chesterfield (1694-1773)

Other Threads