Hi all, I have a website running asp (about to move to asp.net soon though)
which has a list of DVD's I have the various pages I want, last 10, listing,
full listing ect, but the one page i can't figure out is a search page.
I have read various books, but none have given any tips on how to make a
search page for a access DB.
Could someone point me to a tutorial?
Thanks
Donald 4 1639
Hi Donald,
Searching a database is always done in SQL. To acheive a search on an
access database you would need to:
1) Create a search form
2) When the search is processed in the ASP code build up the SQL query
using operators such as LIKE, OR and AND.
3) Execute the query and return all the results.
So, you might for example have one textbox named 'searchtext'. Someone
might enter 'pulp fiction'. In the processing page you would do:
sqlvar = "SELECT * FROM tableFilms WHERE name LIKE '%" &
Request.form("s earchtext") & "%'"
This would produce:
SELECT * FROM tableFilms WHERE name LIKE '%Pulp Fiction%'
Then, execute sqlvar on your database. This would return all records
where the name contains 'pulp fiction'. Check w3schools tutorials on
the LIKE comparison.
You can add more fields to your search form, like dates and one by one
process the search fields slowly building up the SQL query before execution.
Hope this helped,
Tom
"Thomas Gullen" <ad***@drum-world.com> wrote in message
news:41******** ****@drum-world.com... Hi Donald,
Searching a database is always done in SQL. To acheive a search on an access database you would need to:
1) Create a search form 2) When the search is processed in the ASP code build up the SQL query using operators such as LIKE, OR and AND. 3) Execute the query and return all the results.
So, you might for example have one textbox named 'searchtext'. Someone might enter 'pulp fiction'. In the processing page you would do:
sqlvar = "SELECT * FROM tableFilms WHERE name LIKE '%" & Request.form("s earchtext") & "%'"
This would produce:
SELECT * FROM tableFilms WHERE name LIKE '%Pulp Fiction%'
Then, execute sqlvar on your database. This would return all records where the name contains 'pulp fiction'. Check w3schools tutorials on the LIKE comparison.
You can add more fields to your search form, like dates and one by one process the search fields slowly building up the SQL query before
execution. Hope this helped,
Tom
Tom. do you have any tips for rating the results on the fly and showing the
most relevant results first?
mark
Define your "rating" system?
There is no criteria for relevancy either, it either matched or it didnt.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"mark | r" <ma******@gmail .com> wrote in message
news:41******** **************@ news.dial.pipex .com... "Thomas Gullen" <ad***@drum-world.com> wrote in message news:41******** ****@drum-world.com... Hi Donald,
Searching a database is always done in SQL. To acheive a search on an access database you would need to:
1) Create a search form 2) When the search is processed in the ASP code build up the SQL query using operators such as LIKE, OR and AND. 3) Execute the query and return all the results.
So, you might for example have one textbox named 'searchtext'. Someone might enter 'pulp fiction'. In the processing page you would do:
sqlvar = "SELECT * FROM tableFilms WHERE name LIKE '%" & Request.form("s earchtext") & "%'"
This would produce:
SELECT * FROM tableFilms WHERE name LIKE '%Pulp Fiction%'
Then, execute sqlvar on your database. This would return all records where the name contains 'pulp fiction'. Check w3schools tutorials on the LIKE comparison.
You can add more fields to your search form, like dates and one by one process the search fields slowly building up the SQL query before execution. Hope this helped,
Tom
Tom. do you have any tips for rating the results on the fly and showing the most relevant results first?
mark
[Answers Inline]
On Mon, 30 Aug 2004 13:53:06 +0100, "mark | r" <ma******@gmail .com>
wrote: "Thomas Gullen" <ad***@drum-world.com> wrote in message news:41******* *****@drum-world.com... Hi Donald,
Searching a database is always done in SQL. To acheive a search on an access database you would need to:
1) Create a search form 2) When the search is processed in the ASP code build up the SQL query using operators such as LIKE, OR and AND. 3) Execute the query and return all the results.
So, you might for example have one textbox named 'searchtext'. Someone might enter 'pulp fiction'. In the processing page you would do:
sqlvar = "SELECT * FROM tableFilms WHERE name LIKE '%" & Request.form("s earchtext") & "%'"
This would produce:
SELECT * FROM tableFilms WHERE name LIKE '%Pulp Fiction%'
Then, execute sqlvar on your database. This would return all records where the name contains 'pulp fiction'. Check w3schools tutorials on the LIKE comparison.
You can add more fields to your search form, like dates and one by one process the search fields slowly building up the SQL query before execution. Hope this helped,
Tom
Tom. do you have any tips for rating the results on the fly and showing the most relevant results first?
Rating systems are tough because it depends on what you (or your user)
rates as higher than something else. For example, in a search of a
name, you're searching for:
Tom Jones
Define which of these is closer:
Thomas Jones
Tom Jonas
Tony Jones
You may say "Thomas Jones" and it's obvious to you. But "Tom Jonas"
has more matching letters, has more in the right places, is closer
alphabetically and wins all around. Tony Jones is actually closer
since it has a "To" and not a "Th" to start.
Might look at third party search products. :)
Jeff This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
Hi everyone !
This is a first time I post a message here. If I post my message in a
wrong group. Please ignore it.
I am trying to build a website which allows users (can be thousands of
users, supposedly) to upload their files to their designaged
directories (max 15 files for each user). A super user (can be more
than one) want to search for a particular file name and also a
particular textual part of a file of all user's files in all...
|
by: sffan |
last post by:
I am new to database programming and was curious how others solve the
problem of storing encrypted in data in db table columns and then
subsequently searching for these records.
The particular problem that I am facing is in dealing with (privacy)
critical information like credit-card #s and SSNs or business critical
information like sales opportunity size or revenue in the database. The
requirement is that this data be stored encrypted...
|
by: Lloyd Stevens |
last post by:
Is there a way to peform a query search on a database where you type
in a word to be searched across multiple fields?
a bit like a search engine if you like.
for example if searching a stock database typing in the word shoes
would bring up all products with the string shoes in the product name,
but also in description and so on.
regards Lloyd
|
by: Dan |
last post by:
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet
and still trying to figure some things out.
In order to locate a row in an access databse file .mdb, i am using this
call
Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtScan.Text)
where me.txtscan.text is a value from 2 to 9323493000236.
|
by: Geoff Jones |
last post by:
Hiya
I have a DataTable containing thousands of records. Each record has a
primary key field called "ID" and another field called "PRODUCT" I want to
retrieve the rows that satisy the following criteria:
I have a list of about 100 numbers which correspond to the ID field and also
another 40 say numbers corresponding to the numbers in the PRODUCT field. I
want to show the rows that correspond to both these criteria.
| |
by: vonclausowitz |
last post by:
Hi All,
I was thinking of creating a table in my database to index all words in
the database.
That way I can quickly search for one or more words and the index table
will return the
words and records I need.
For example the iTable would look like this:
|
by: MMcCarthy |
last post by:
There is a question in the Access forum you may be able to help with. I can move it over here if it is appropriate.
http://www.thescripts.com/forum/thread598513.html
Could you also check out this question I moved over here yesterday.
http://www.thescripts.com/forum/thread598380.html
Thanks everyone.
|
by: sirimanna |
last post by:
Dear anyone
I am developing a Visual Basic 6 application. I have a problem with linking and searching database.
I have already linked my database but when i tried to search it to my application it doesn't working.
Can you tell me the how to do codings.
If you can please send me the codings.
Thank You
|
by: thomson |
last post by:
Hi All,
i have a sit which deals with cars, and i have a table
associated with this, i do have a problem in designing the
application, i have lot of places in the web page where it hits the
the same table but the criteria (parameters) will be different,
Can some body help me out in designing a class which suits the above
purpose , or sugggest me Best Practices for the same
Thanks in advance
|
by: deepuv04 |
last post by:
Hi,
I have a table Users with the columns say
UserName
FirstName
LastName
City
State
Province
Zip
Country
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |