Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.252 Beiträge
Delphi 2006 Professional
|
Re: SQL Befehl (SELECT Begriff FROM Tabelle) Was stimmt nich
7. Mär 2004, 16:49
Versuche es mal so:
Delphi-Quellcode:
q:= ' %' + Combobox1.Text + ' %';
with ZReadOnlyQuery1 do
begin
close;
SQL.Clear;
SQL.Text.Add := (' SELECT * FROM Tabelle WHERE');
SQL.Text.Add := (' id LIKE :id OR ');
SQL.Text.Add := (' name LIKE :name OR ');
SQL.Text.Add := (' vorname LIKE :vorname OR ');
SQL.Text.Add := (' strasse LIKE :strasse OR ');
SQL.Text.Add := (' plz LIKE :plz OR ');
SQL.Text.Add := (' stadt LIKE :stadt OR ');
SQL.Text.Add := (' email LIKE :email OR ');
SQL.Text.Add := (' notiz LIKE :notiz');
ParamsByName (' id').AsString := q;
ParamsByName (' name').AsString := q;
ParamsByName (' vorname').AsString := q;
ParamsByName (' strasse').AsString := q;
ParamsByName (' plz').AsString := q;
ParamsByName (' stadt').AsString := q;
ParamsByName (' email').AsString := q;
ParamsByName (' notiz').AsString := q;
open;
end;
Stephan B. "Lasst den Gänsen ihre Füßchen"
|