Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Welches tabellen feld hat einen Index ? (https://www.delphipraxis.net/185609-welches-tabellen-feld-hat-einen-index.html)

bernhard_LA 24. Jun 2015 10:55

Datenbank: MSSQL • Version: 12 • Zugriff über: ADO

Welches tabellen feld hat einen Index ?
 
ich erzeuge eine DB Tabelle mit diesem script

Delphi-Quellcode:
Create table TableName (UN_ID int identity PRIMARY KEY, Mydata .......);


Über die Fieldkind property wollte ich herausfinden welches Feld mein PRIMARY KEY ist

Delphi-Quellcode:
      for i := 0 to table.FieldCount - 1 do
      begin

        if (table.Fields[i].FieldKind <> fkInternalCalc )then
        begin
        ....
        end;
      end;

funktioniert so aber nicht ....; wie geht es richtig ?

Bambini 24. Jun 2015 11:04

AW: Welches tabellen feld hat einen Index ?
 
Die ADO OpenSchema Methode gibt darüber Auskunft:
https://msdn.microsoft.com/en-us/lib...v=bts.10).aspx


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:44 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz