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.

[Borland C++ 5] Suche in Paradox DB mit TLocate (TTable)

Empfohlene Antworten

Veröffentlicht

Hallo habe folgendes Problem,

ich will in einer DB nach den Benutzereingaben suchen (z.B. Interpret --> edtInterpretSuche). Ich kann aber nicht nach Teil-Strings suchen, d.h. wenn ich xavier naidoo eingebe findet das prog den datensatz, wenn ich nur naidoo eingebe findet das prog nichts. Wie kann ich das Problem umgehen, die Wildcard (*) kann ich nicht vor der Variable setzen, das behebt das Problem nicht. Vielen Dank im Voraus. :)

void __fastcall TfrmSuche::btnSuchenClick(TObject *Sender)

{

 String sInterpretSuche = "";  //need: adding the volume of edtInterpretSuche to the search engine

 String sTitelSuche = "";      //need: adding the volume of edtTitelSuche to the search engine

 String sAlbumSuche = "";      //need: adding the volume of edtAlbumSuche to the search engine


 if (frmSuche->edtInterpretSuche->Text != "" && frmSuche->edtTitelSuche->Text == "" && frmSuche->edtAlbumSuche->Text == ""){


    sInterpretSuche = frmSuche->edtInterpretSuche->Text;

    Table1->Filter = "Interpret = '" + sInterpretSuche + "*'";


    TLocateOptions Options;

    Options << loPartialKey;


 }else if (frmSuche->edtInterpretSuche->Text == "" && frmSuche->edtTitelSuche->Text != "" && frmSuche->edtAlbumSuche->Text == ""){


    sTitelSuche = frmSuche->edtTitelSuche->Text;

    Table1->Filter = "Titel = '" + sTitelSuche + "*'";


    TLocateOptions Options;

    Options << loPartialKey;


 }else if (frmSuche->edtInterpretSuche->Text == "" && frmSuche->edtTitelSuche->Text == "" && frmSuche->edtAlbumSuche->Text != ""){


    sAlbumSuche = frmSuche->edtAlbumSuche->Text;

    Table1->Filter = "Album = '" + sAlbumSuche + "*'";


    TLocateOptions Options;

    Options << loPartialKey;


 }else if (frmSuche->edtInterpretSuche->Text == "" && frmSuche->edtTitelSuche->Text == "" && frmSuche->edtAlbumSuche->Text == ""){

    MessageBox(Handle, "Bitte geben Sie etwas ein!", "Message", MB_OK);

}

}

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.