Autor Beitrag
coder24h
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 17.10.05 21:42 
Hallo zusammen, kann mir bitte jemand sagen wie ich einen Wert aus einer Tabelle in eine Variable rein bekomme? Momentan benutze ich C++ Builder macht aber oft bei Borland keinen Unterscheid.

Vorgegangen bin ich so:
ausblenden Quelltext
1:
2:
3:
Query1->SQL->Clear();
Query1->SQL->Add(„select name from t_client where id_client = 1“);
Query1->Open();

Wenn ich durch DataSource die Ausgabe umleite wird alles richtig selectiert. Ich möchte aber den Wert in eine von mir deklarierte Variable rein schreiben! Sie können natürlich gerne in Delphi Beispiel schreiben ich hoffe auf eine schnelle Antwort und nochmals Danke!

Mit freundlichen Grüßen
coder24h
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mo 17.10.05 21:51 
variable=Query1->FieldByName("name").AsString Oder statt AsString, AsInteger oder ähnliches
coder24h Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 18.10.05 15:47 
Super, werde ich sofort mal ausprobieren!
Vielen Dank UGrohne!!!
coder24h Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mi 26.10.05 17:37 
Wie kann ich die Ausgabe eines Selects, das keine Tabellenfelder beinhaltet in eine Variable schreiben?
ausblenden Quelltext
1:
Query1->SQL->Text = "SELECT DECODE(:pmOldCryptKey, :pmGlobalKey)";					


variable=Query1->FieldByName("name").AsString kann ich hier nicht benutzen, da keine Tabelle selectiert wird sondern nur die Funktion DECODE() einen Rückgabewert liefert!

Kann mir bitte jemand helfen?
coder24h Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mi 26.10.05 18:26 
Was Passendes habe ich jetzt hier gefunden! Vielen Dank an den Verfasser!
www.delphi-forum.de/...&highlight=count

MfG coder24h