Hallo,
Aus Google.
Zitat:
Using DAO you can look through the TableDef.Indexes collection. There is
an Index.Primary property that is true if the index is a primary key
index. You can then find the field names by looking at the fields
collection of the Index. There may be a more direct way using DAO that I
am not aware of.
Also
Delphi-Quellcode:
ADODataSet1.CommandText := 'SELECT * From Kunde';
ADODataSet1.Active := True;
ADODataSet1.IndexDefs.Update;
for i:= 0 to ADODataSet1.IndexDefs.Count-1 do
begin
IndexDef:= ADODataSet1.IndexDefs[i]
if IndexDef.Primary ...
Heiko