Autor Beitrag
rushtone
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Mo 19.02.07 14:19 
hi hab mal wieder eine frage..
antowrt ist wohl ganz simpel nur ich komm nicht drauf.
ich möchte mir was in ne com,bobox einlesen lassen, allerdings möchte ich nur sachen einlesen die 2 kriterien erfüllen..
zum einen das added = Nein ist zum anderen das Firma = dem text in combobox1 entspricht.

so ist mein code bisher, aber so funktioniert es nicht.. ich denke es löiegt and den '
hab schon alles mögliche ausprobiert und auch die delphi hilfe durchstöbert.. bekomms aber nciht hin.

hat jemand ne idee?

ausblenden Delphi-Quelltext
1:
form15.Query1.sql.add('select distinct Baustelle from Einsätze.db where Added = ''Nein'' AND Firma = 'form15.combobox1.text'');					


Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 19.02.07 14:25 
Hallo!

ausblenden Delphi-Quelltext
1:
form15.Query1.sql.add('select distinct Baustelle from Einsätze.db where Added = ''' + 'Nein' + ''' AND Firma = ''' + form15.combobox1.text + ''' ');					


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 19.02.07 14:31 
Oder mit QuotedStr() oder mit Parametern.
BTW. Nimm besser .SQL.Text := ... statt .SQL.Add()

_________________
Markus Kinzler.
rushtone Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Mo 19.02.07 14:36 
vielen dank es funktioniert einwandfrei..
danke :)