Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Search

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
Hi all

I am currently developing a web site which requires a search facility. The site contains static and ASP sections which is linked to an Access 2000 Database. I am trying to use a freeware to do the search facility. I have tried Atomz search facility however this does not search the database.

I was wondering does anybody know of any software/freeware that could offer static and dynamic searches. Or any other methods I could use, I was thinking about using the Indexing facility within IIS, however do not know how well it would perform. Any help would be very much appreciated

Many thanks in advance

Indy
 
Why u just use an manualy search just like

select * from MyDatabase where field1 like "george" and field2 = 10 and ....

and it will do the search Access 2000 itself
 
There is a way that I searched a field in a db. I used the regexp object. See msdn.microsoft.com/scripting. Find the vbscript section and look up regexp object...all you have to do is set whatever you enter into a certain pattern.

This is a snippet from a page I did.
<%
strTopic=request.form(&quot;topic1&quot;) 'form field
strImage=request.form(&quot;image&quot;) 'form field

'If textbox is not empty this module is activated-search on keywords
If strImage <> &quot;&quot; then

'Establishes search engine
set re=new regexp 'regexp object
re.Pattern=strImage 'pattern is what you enter in the field
re.IgnoreCase=true 'matches w/o case
oRS.Open &quot;SELECT * FROM nfield&quot;,oC %>
<td WIDTH=&quot;65%&quot; VALIGN=&quot;TOP&quot;>
<select name=&quot;D1&quot; size=&quot;1&quot;>'creates a drop-down to populate based upon matching records.
<option value=&quot;&quot;>Select</option>
<%
do while NOT oRS.EOF
'line below...if a test of the pattern matches the sdescription, populate dropdown
If re.Test(oRS(&quot;sdescription&quot;))=true then
searchcounter=searchcounter+1
%>
<option select VALUE=&quot;<%=oRS(&quot;sdescription&quot;)%>&quot;>
<% =oRS(&quot;sdescription&quot;) %>
</option>


I hope that helps if that is what you are looking for.

Mike
 
Indexing within IIS only searches static files, so if the majority of your content sits in static HTML files, that may be the way to go.

Anyways - Mike had the right idea in regards to implementing a search, you should use regular expressions.

What I did (the code is at home, i'll gladly post it if you want to see it) was parse the search string looking for boolean matches and &quot; marks. I took those, and formed the appropriate search string, and passed it to the Access DB.

ex:
search query: microsoft AND office OR &quot;windows xp&quot;

sql:
select * from tbl
where (field like '%microsoft%' and field like '%office%') or (field like '%windows xp%')

In order to get this to work, I had to use something called non-greedy repetition.

hope this helps
leo

 
I agree with vasah20. MS Index Server is good if you have a site which produces physical, static Web documents only (and even then, mostly only .HTM, .HTML, and .TXT files).

I wrote my own search script for my site awhile ago, and got near-critical errors that rendered my site unusable for any user hitting it:

===========================================================
Microsoft OLE DB Provider for ODBC Drivers error '8007000e'

[Microsoft][ODBC Microsoft Access Driver] Not enough space on temporary disk.

<<<PATH TO FILE>>>, <<<LINE OF FILE CAUSING ERROR>>>
===========================================================

This is because I use a search script which searches more than 1,600 fields of &quot;Memo&quot; type (recall that Memo fields can have up to 65,000 characters per record), using the '%' wildcard and the SQL 'LIKE' statement:

SELECT table1, table2
WHERE varSearchString LIKE '%'

This is way too intensive for a table that size, I found out the hard way. There are other services available, although not as customizable as you might want...for thinigs like limiting the files you want included in your searchable index.

In the meantime, I've implemented the free Google search service ( ...which is OK...but not comprehensive. It's at
Also, CNet had a good article on free

Additionally, even if you're anewbie to Perl, you should be able to figure out how to modify the syntax for the free script WEBSEARCH. It's more customizeable so you can pick and choose with directories you want to search (and ignore) and likewise with filetypes.

Another good one is at:
If you find anything, I'm in the same boat as you, so e-mail me at jason@kuam.com

Happy hunting!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top