[thelist] RE: Wordsearch in ASP/Access

Steve Cook steve.cook at evitbe.com
Wed Oct 2 08:18:01 CDT 2002

> Problem is, I've never really found a good listing for these,
> though a good
> 1000-page Access "Bible" should have a pretty thorough
> listing of this.

If you look at the help file that comes with Access 2000 and click on
"Index" you'll find a heading marked "Microsoft Jet SQL Reference" - that's
the most authoritative source of SQL help within Access that I know of.

Kevin, the basic idea suggested by others here should work - you'll need to
dump your Word files into a Memo field in your database (formatted as HTML
perhaps?). The database could be as simple as:

idNum 		autonumber
title			text(255)
article		memo
articleDate		date/time

Then do something along the lines of

"SELECT idNum, title, article, articleDate FROM articles WHERE article LIKE
'%" & strSearchWord &  "%';"

As mentioned earlier you'll match searchterms within words, but if you
really can't live with that you're either going to have to use SQLServer for
the extended full-text indexing methods that are available, or clean up your
results in your ASP code afterwards. (A regular expression that checks word
boundaries would do the trick).

That's the simple way to go about it. One can get a lot more complicated
with a search function - if you want to do ranking for instance I can
probably help with some code, but it gets very tricky.

Finally, if you were looking for something which searches the Word documents
as they are without conversion to text format first then you will definitely
need to look at something like Index Server. However it's not
straightforward and will almost certainly not come under the heading of a
cheap solution. I've not used it myself, but I don't think you generally
find index server installed on shared server hosting space. I would
definitely look at recommending a conversion to HTML or similar.

Hope that helps get you underway.


 Cookstour - http://www.cookstour.org

More information about the thelist mailing list