Autor Beitrag
seoman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Mi 19.05.04 15:19 
Hoi,

könnt ihr mir vielleicht erklären,
was den Unterschied zwischen
ausblenden Delphi-Quelltext
1:
ClientDataSet.AddIndex('testindex','Spalte1;Spalte2',[],'','',0);					

und
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
with ClientDataSet.IndexDefs.AddIndexDef do
begin
  Name := 'testindex';
  Fields := 'Spalte1;Spalte2';
end;

ausmacht ??

Denn wenn ich nach Ersterem einen IndexCount mache,
gibt dieser mir 0 als Ergebis.

Wird mit AddIndex etwa kein IndexDef erstellt ??? :shock:

thanxx
-seoman
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Do 20.05.04 10:01 
Mit AddIndex wird sofort der Index erstellt, bei AddIndexDef werden erst alle Indezies definiert und dann in der Methode CreateTable erstellt. AddIndex kann nur auf schon existieren Tabellen angewendet werden, AddIndexDef nur, wenn die Tabelle noch zu erstellen ist.

Alles weiter steht in der Delphi Hilfe.

Gruß
KidPaddle
seoman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 20.05.04 12:59 
thanx

ist es also nicht möglich,
vor dem Löschen eines mit AddIndex hinzugefügten Indexes
abzufragen ob dieser überhaupt existiert
(außer über ClientDataSet.IndexName,
was mir ja eigentlich nur aussagt,
ob ich der Eigenschaft einen Wert zugewiesen habe)?

bzw. wo wird dieser abgelegt?

-seoman