Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: So 16.11.03 20:42 
hi,
ich habe ein Tutoriual versucht nachzumachen. (siehe hier).

Die Verbindung kann ich ausführen, die Abfrage ich auch kein problem. Doch wie ich jetzt das ergebnis rauskriege weiß ich leider nicht :cry:

Damit habe ich es versucht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure TForm1.Button2Click(Sender: TObject);
var q: string;
ex: boolean;
i:integer;
af: TMysql_FieldDef;
begin
q :='select passwort from games where username="admin"';
FResult := FMysql.query(q, true, ex);
if assigned(FResult) then
  begin
  for i:=0 to FResult.FieldsCount-1 do
    begin
    af:=FResult.FieldDef(i)^;
    showmessage(af.Name);
    end;

  end;
end;


was nun?
thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 17.11.03 10:57 
Was ist denn FResult für ein Typ?

Gruß
Tino
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Mo 17.11.03 11:09 
Auch interessant: Was für ein Problem hast du? Kannst du nicht kompilieren? Bekommst du eine Exception? Explodiert jedes Mal der Toaster in der Küche beim Ausführen? :wink:

Cu,
Udontknow
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 17.11.03 15:18 
hi,
ausblenden Delphi-Quelltext
1:
2:
3:
4:
private
  FMysql: TMysqlClient;
  FResult: TMysqlResult;
    { Private-Deklarationen }


und ich bekomme als Ergebnis nur den Namen der Tabelle zurück.

MfG Hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej