Autor Beitrag
chrizz_15
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mo 26.04.04 15:39 
Hallo!

Wieder hab ich ein Problem :?

Ich greif über eine Query auf eine MS-Access DB zu und möchte gerne eine Abfrage machen die ungefähr wie folgt aussieht:
ausblenden Quelltext
1:
'%abc%'					


Und das solle Einträge finden wo eben "abc" vorkommt.

Umgesetzt hab ich das wie folgt:

ausblenden Quelltext
1:
2:
      SQL.Add('SELECT * FROM Nutzer');
      SQL.Add('WHERE Name = "'+ '%'+ Edit5.Text +'%' +'"');


Es compiliert nur leider findet er nix. Hab ich mich vielleicht irgendwo mit den Hochkommata vertan? :?

Viele Grüße Christoph :roll:
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Mo 26.04.04 17:39 
Titel: hmm,
probier mal anstatt = ein LIKE . Wildcards werden bei = nicht genommen.

_________________
mfg. Joel
chrizz_15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mo 26.04.04 17:57 
Dankeschön! :D

Jetzt funktioniert es.

:?: Warum das so ist und warum das in keinem Buch steht ist mir ein riesengroßes Rätsel.
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Mo 26.04.04 18:30 
Titel: hmm,
das ist einfach so weil = eben GLEICH bedeutet, aber du suchst ja etwas das LIKE (so ähnlich) wie der Suchbegriff ist.

_________________
mfg. Joel
chrizz_15 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mo 26.04.04 18:42 
Zitat:
weil = eben GLEICH bedeutet, aber du suchst ja etwas das LIKE (so ähnlich) wie der Suchbegriff ist

Das macht Sinn :!:

Danke jedenfalls!