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: Sa 20.05.06 07:44 
Hi Delpher,

ich brauche mal Hilfe bei dem folgenden SQL-Befehl:

select * from Buecher.dbf where titel = :edit2.text order by name

Wie funktioniert er richtig? Bisher bekomme ich die Fehlermeldung:
Typ für Feld edit2.text ist unbekannt.

Vielen Dank für eure Hilfe, sagt

Detlef Annies
Lake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Sa 20.05.06 08:07 
Der query einen Parameter zuweisen z.B. parTitel;

dann dem Parameter den Wert zuweisen.

ausblenden Delphi-Quelltext
1:
query.ParamByName('parTitel').asString := edit2.text;					

_________________
Gruss Lake
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: Sa 20.05.06 13:10 
Danke für deine Antwort, Lake!
Jetzt gehe ich erstmal schwimmen, dann gehe ich an den Rechner. - Sonst komme ich nämlich nicht zum Schwimmen!

Gruß aus HL, Detlef
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.05.06 07:03 
So, jetzt läuft alles bestens!

Was du nicht wissen konntest - weil ich es nicht extra gesagt habe - ich beziehe mehrere SQL-Befehle aus einer Textdatei, die ich vorher angelegt habe und binde sie durch anklicken einfach als Inputstring ein.

Dann musste ich nur noch eine If-Abfrage einbauen:
If pos('Titel', inputstring) > 0 then parambyname ....

Danke für deine Hilfe sagt
Detlef Annies