Autor Beitrag
daggit
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Do 08.09.05 14:43 
Hi,

ich möchte gerne alle Spalteninhalte und Spaltennamen meines querrys auslesen. Die anzahl und namen der spalten sind unbekannt. (Werdn mit select * selektiert)... weiss jemand wie was möglich ist?
xck3001
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 32


D5 Pers, D7 Ent
BeitragVerfasst: Do 08.09.05 15:57 
Ich würde es so lösen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
var 
  i: integer;
begin
[...]
Query.Open;
for i:=0 to FieldCount-1 do
  // hier per Query.Fields[i].Fieldname die Feldnamen bearbeiten
Query.First;
while not Query.EOF do
begin
  for i:=0 to FieldCount-1 do
    // hier per Query.Fields[i].AsString o.Ä. die Felder auswerten
  Query.Next;
end;
Query.Close;


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
daggit Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Do 08.09.05 16:21 
besten dank !!!!! :)