Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi ABSQuery und FieldType (https://www.delphipraxis.net/203774-absquery-und-fieldtype.html)

NoGAD 27. Mär 2020 08:47

AW: ABSQuery und FieldType
 
Ich habe zwischenzeitlich eine Antwort vom Programmierer der ABSDatabase erhalten.

Zitat:

Please note that ABSQuery works in 2 modes:

1) ABSQuery.RequestLive = True before its opnening, and you do SELECT
from 1 table only
Then you get live result - editable records of original source table, then
datatypes should be remain the same as in source table

2) ABSQuery.RequestLive = False, or you do select from several tables,
or use UNION / GROUP BY / ... other complex options.
Then you get new temporary table - records are copied from original
tables and they are marked as read-only in this result temp table,
then autoinc datatype is changed to Integer type


Somit klappt es auf folgendem Weg:

Code:
        ABSQuery1.RequestLive := true;
        ABSQuery1.SQL.Text := 'SELECT * From ' + _Table_Name + ' WHERE 1 = 0';
        ABSQuery1.Open;
//      ABSQuery1.Fields[ x ].DataType enthält nun den aktuellen Datentyp des Feldes x in Form eines TFieldType
Das Thema kann bitte geschlossen werden.


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:33 Uhr.
Seite 2 von 2     12   

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