Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mySQL Durchsuchen Delphi6

Empfohlene Antworten

Veröffentlicht

Hallöchen,

also ich hab ne ADO Connection zu ner mysql Datenbank aufgebaut die über ne ADOQuery geht. Wenn ich ne SQL Abfrage so wie diese hier nehme:

SELECT * FROM tabelle

wird mir alles angezeigt. Soweit so gut. Jetzt möcht ich ne Suchfunktion einbauen. Nach Eingabe eines STichwortes in ein Textfeld soll mir dann nur die betreffenden Datensätze angezeigt werden. Der SQL String soll dann wie folgt aussehen:

SELECT * FROM tabelle where news like :stichwort

Wie kann ich den Eintrag aus dem Textfeld an die ADOQuery übergeben?

Danke schonmal

Wenn du es mit Parametern machst, also :Stichwort, musst du den Parameter im Query (Eigenschaft Params) erstmal als String deklarieren (einfach auf "..." bei Params klicken - DataType = ftString) und dann vor dem Open den Wert zuweisen

Query.ParamByName('Stichwort').asString := Edit.text;

Query.Open;

Oder du füllst den SQL.Text erst vor dem Open

also

Query.SQL.Text:= 'SELECT * FROM TABELLE WHERE NEWS LIKE '+QuotedStr(Edit.Text);

Query.Open;

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.