This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Adobe Creative Suite » Seaching a database
Reply

Seaching a database

Mark Capric
Member



Since: 16 Aug 2004
Posts: 2
Posted 16 Aug 2004 17:03:38

I need some major help on a project I'm trying to start with. I have an MS Access DB, I want to be able to have a html search engine that searches through the DB and then displays the results on another html page. Can someone tell me where I can started? Thanks for any help you can give.

I need some major help on a project I'm trying to start with. I have an MS Access DB, I want to be able to have a html search engine that searches through the DB and then displays the results on another html page. Can someone tell me where I can started? Thanks for any help you can give.
Dave Thomas
Zone Administrator



Since: 02 Jul 2002
Posts: 1,216
Replied 16 Aug 2004 22:39:54
its not as hard as it sounds to do a search. its when you want to highlight and rank searches that it gets complicated.

basically you'll need a table in your database to search, but what is it your searching for? a title, something in the description, keywords???

you basically create a form with a textfield and a go button. call the textfield 'txtSearch' and have the action of the form set to 'search_results.asp' or something similiar. thats the first bit done.

now open 'search_results.asp' and create a recordset. You'll need to go into advanced SQL.

depending on what your searching for it will be along the lines of.

<pre id=code><font face=courier size=2 id=code>
SELECT * FROM tblArticles WHERE ArticleTitle LIKE '%" + Replace(rsNews__MMColParam, "'", "''" + "%' ORDER BY ArticleID DESC
</font id=code></pre id=code>

MMColParam is created by adding a varibale in the box with the value and run time string options and adding.
value = %
runtime string = Request.Form("txtSearch"

when that is set up, you add the data to the page via a table or whatever from the bindings panel, and you have a working search.

btw the % sign is a wildcard, there are a lot of ways to search for something, my example is just a basic search.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency