ADO Database Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
Table1: TTable;
begin
Table1 := TTable.Create(Owner);
with Table1 do
begin
DatabaseName := DBDEMOS;
TableName := CDCOLL.DB;
FieldDefs.Clear;
FieldDefs.Add(ADI, ftString, 25, false);
FieldDefs.Add(SOYADI, ftString, 20, false);
FieldDefs.Add(YAS, ftSmallInt, 0, false);
IndexDefs.Clear;
IndexDefs.Add(TITLE, ADI, [ixPrimary, ixUnique]);
end;
Table1.CreateTable;
DataSource1.Dataset := Table1;
Table1.Active := True;
end;
// Kemal GÜLOL gulolkml@hotmail.com