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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search engine in access

Status
Not open for further replies.

at51178

Technical User
Mar 25, 2002
587
US
I would like to create a intranet website and have a seach engine that can look access database

I know how to create one by doing it through the query by setting a criteria
but i want the user to not realize that they are looking in access database

let me know if this can be done

thanks in advance

 
just use the post method of the form, this will hide the data being tranfered to the next page, then use

Code:
request.form("variable") to

to get the passed vals and run your query


HTH,



Shri
 
can you give me an example on how to do it
 
On Search page, presumable, you are using asp, if not, the dosearch.asp will have different extention and the dosearch page itself will obviously be different

Search.asp
Code:
<html>

......

<form action='dosearch.asp' method='post'>
           search for <input name='searchfor'>
           <input type='submit' name='Method' Value='Search'>
</form>

........
</html>
DoSearch.asp
Code:
<html>
<%
Dim inMethod

inMethod = Request.Form(&quot;Method&quot;)

If Len(inMethod) = 0 Then
       '# Search was not done, redirect back
       response.clear
       response.redirect(&quot;search.asp&quot;)
end if

Dim SearchFor
SearchFor = Request.Form(&quot;SearchFor&quot;)

Dim SQL
SQL = &quot;SELECT * FROM Table WHERE Field = '&quot; & SearchFor & &quot;'&quot;

'# Open your connection
Dim Conn

'# Your code for opening a db connection
...

Dim RS
Set RS = Conn.Execute(SQL)

'# just loop through and display the records

Do Until RS.EOF

     '# display record
     ....

     '# never forget the following line
     RS.MoveNext
Loop

%>
</html

HTH,


Shri
PS - I haven't tested the above and you will have to add your own bits in like the connection part
 
I Kinda of understand what you are saying with this statement but what should I but instead of dosearch.asp if I am using strictly Microsoft Access and HTML/Javascript
unfortunatley I don't have access to IIS server

I tried putting in the table name but it didn't work for some reason
 
I am not too familiar with that kinda stuff but I think rdo and such like might be what you are looking for. I know that it *is* possible with client side vbscript. If you like, I'll try to dig up some code do it using that


Shri
 
Ya if it is not a prob for you thanks I appreciate it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top