Board index » delphi » Locating Matching Existing / Matching Record

Locating Matching Existing / Matching Record

How can I effectively locate an existing Paradox record after entering, say,
a social security number in a DBEdit control.  I don't have an index on the
SSNum field so that it will sort the database by last name.  I've tried this
several times by entering an OnExit event for the DBEdit control, but I only
want this to check for the record only when I choose to Insert a new record,
not everytime I tab from control to control.

Thankx In Advance For Your Assistance.

 

Re:Locating Matching Existing / Matching Record


On Wed, 15 Apr 1998 03:04:46 -0400, "Charles E. Bouknight"

Quote
<unif...@clark.net> wrote:
>How can I effectively locate an existing Paradox record after entering, say,
>a social security number in a DBEdit control.  I don't have an index on the
>SSNum field so that it will sort the database by last name.  I've tried this
>several times by entering an OnExit event for the DBEdit control, but I only
>want this to check for the record only when I choose to Insert a new record,
>not everytime I tab from control to control.

>Thankx In Advance For Your Assistance.

If you want speed, you may have to add an index. Otherwise, you'll
have to search from start to finish reading all of the values.
Alternatively, if there aren't too many values, you can read the lot
into a TStringList at the beginning of the program and then search
that for each entry which will be faster than searching the table
itself.

Steve F (Team B)

Other Threads