[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Search in paradox table

Posted on 2000-05-16
1
Medium Priority
?
214 Views
Last Modified: 2010-04-04
I need to make a program which search
a string in a paradox table. So, what I actually need is a source code example for the search.
for example the data what i have is
book 1
book 2
Delphi book
Access book  
The search what i need as follow, if i search for word "book" it has to show me all the records which not only starts with the word "book" it has to show me also "delphi book" and "access book" too
thank you in advance

0
Comment
Question by:sivatagiherceg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
aubs earned 60 total points
ID: 2814058
You can use a TQuery component to return a recordset of all the records containing the search word.


Drop an edit box a memo, a button
and a  TQuery component on a form put this statement in the SQL property

SELECT * FROM Books        (or whatever the db name is)
WHERE BookTitle LIKE :BkTitle  (assuming BookTitle is the fieldname!))

Set the DatabaseName property to the directory of the database (or alias if one is set up)

in the onclick event for the button add

Query1.ParamByName('BkTitle').AsString:= '%'+edit1.text+'%';
Query1.Prepare;
Query1.Open;
memo1.clear;
While not Query1.EOF do
   memo1.lines.add(query1.FieldByName('BookTitle').AsString);
Query1.Close;

Run the prog.
type the search word into the edit box and click the button.

Regards

Aubs
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question