Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 20.07.05 03:56 
Hi, ich will rausfinden welches das Zählfeld ein DB Tabelle ist und habe es mit FieldDefs[i].AutoGenerateValue = arAutoInc aber es
kommt immer False dabei raus! Habe es auch mit DataType = ftAutoInc und mit Field[I] is TAutoIncField aber immer Faaalseee!

Wie mache ich das den?

//EDIT

Hey Leute in der Delphi-Praxis konnte man mir helfen, es gibt ja doch Leute die bescheid wissen!

Also ich mache:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
ZQuery.SQL.Clear;
ZQuery.SQL.Add('Show full columns from `Tabelle`);
ZQuery.Open;

for I := 0 to ZQuery.RecordCount - 1 do
begin
   if(ZQuery.FieldByName('
Extras').AsString = 'auto_increment')then
   begin
   AutoIncField := ZQuery.FieldByName('
Field').AsString;   
   Break;
   end;
ZQuery.Next;
end;
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 26.07.05 07:06 
Das ist aber spezifisch für mySQL.
Das soll keine Kritik an der Lösung sein, sondern ein Hinweis.