Como criar índices NTX no Delphi

Delphi

14/07/2004

Olá amigos,

Gostaria de saber como criar índices Clipper em Delphi ou com qualquer outra ferramenta, sem utilizar o componente Haylcom.


Rodolpho123

Rodolpho123

Curtidas 0

Respostas

Ursulasobrinho

Ursulasobrinho

14/07/2004

uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, DB, DBTables;
procedure TForm1.Button1Click(Sender: TObject);
var
Table1 : TTable;
begin
{ Criar arquivos }
Table1 := TTable.create(Application);
{ Cria arquivo }
with Table1 do
begin
Active := False;
DatabaseName := ´C:\´;
TableName := ´teste´;
TableType := ttdBASE;
with FieldDefs do
begin
Clear;
Add(´Name1´, ftString, 20, False);
Add(´Name2´, ftString, 20, False);
Add(´Name3´, ftString, 20, False);
Add(´Name4´, ftString, 20, False);
end;
CreateTable;
AddIndex(´Indice1´, ´Name1 + Name2´, [ixExpression]);
AddIndex(´Indice2´, ´Name2 + Name3´, [ixExpression]);
AddIndex(´Indice3´, ´Name3 + Name4´, [ixExpression]);
end;
end;


GOSTEI 0
Aroldo Zanela

Aroldo Zanela

14/07/2004

Colega,

As formas que conheço são com o uso de componentes de terceiros, como o Halcyon ou Apollo.


GOSTEI 0
POSTAR