Autor Beitrag
mtm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

Windows 10 Pro 64 Bit
Delphi XE 6
BeitragVerfasst: Mi 18.04.12 23:05 
Hallo zuammen !

Ich bin gerade dabei mit Firebird und ZEOS eine kleines Programm zu entwickeln. Das Programm soll u.a. den Datentyp der Felder von verschiedenen DB's herausfinden.

In einer Firebird-Datenbank habe ich ein Feld mit Typ Smallint und Domäne "BOOLEAN".

Nun kann mann ja über TField.DataType den Feldtyp herausfinden. Bei dem o.g. Bsp. wird dabei aber Smallint ermittelt. So weit, so gut. Wie komme ich nun aber an die Domäne des Feldes ?

Ich hoffe, jemand von Euch kennt die Antwort
Danke im Voraus
mtm
Nersgatt
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1581
Erhaltene Danke: 279


Delphi 10 Seattle Prof.
BeitragVerfasst: Do 19.04.12 06:18 
Das kannst Du aus den Systemtabellen abfragen:
ausblenden SQL-Anweisung
1:
2:
3:
select f.rdb$field_source from rdb$relation_fields f
      where f.rdb$relation_name = :tabelle AND
      f.rdb$field_name = :fieldname


Beim Tabellennamen kannst Du auch den Namen einer View einsetzen. Funktioniert auch.

_________________
Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
mtm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

Windows 10 Pro 64 Bit
Delphi XE 6
BeitragVerfasst: Do 19.04.12 14:00 
Merci vielmals. Funktioniert !!!