Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 21.08.05 19:55 
Hi Delpher,

(wie) kann ich das Ergebnis einer SQL-Abfrage in einem Stringgrid ausgeben?

Danke für Hilfe,

Detlef Annies
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 21.08.05 20:06 
Ungefähr so :

ausblenden Delphi-Quelltext
1:
sg.Cells [1,1] := DataSet.FieldByName('FELDNAME').AsString;					

_________________
Gruß
Hansa
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 21.08.05 20:44 
Hi Hansa!

Das nenn ich eine schnelle und kurze Antwort! - Hast wohl den Turbo eingeschaltet?

Danke,
Detlef
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 21.08.05 21:59 
user profile iconD. Annies hat folgendes geschrieben:
..Turbo eingeschaltet?


Jo. :mrgreen:

_________________
Gruß
Hansa
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 21.08.05 22:16 
Kurze Nachfrage:

Ist es eigentlich eleganter, dieses Problem mit einem SELECT zu machen oder mit
einer while not eof-Schleife?

Gruß,
Detlef
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 21.08.05 22:39 
Kerle, Kerle. 8)

ausblenden Delphi-Quelltext
1:
2:
3:
    ArtDS.Close;
    ArtDS.SelectSQL.Text := 'SELECT * FROM ART WHERE UPPER (BEZ) LIKE UPPER (''%' + edSuch.Text + '%'') ORDER BY NR';
    ArtDS.Open;


So erzeugt man sich eine Datenmenge, die über den über ein TEdit eingegegebenen Begriff eingegrenzt ist (hier : Bezeichnung). Danach wird mit Next/prior darin navigiert. Der Rest der Frage geht am Thema vorbei. :mrgreen:

_________________
Gruß
Hansa
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: So 21.08.05 23:22 
Autsch - hast ja recht.

:flehan:

Bis dann,
Detlef