Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : search engine for a database? Signup · Login
Author Thread
search engine for a database?
Posted in tutorial: An ASP Tutorial to create your own Database driven Search Engine
·  gilgalbiblewheel
User
Joined: 8 Jul 2004
Total Posts: 6

search engine for a database?

Posted: 8 Jul 2004
Hi,
I have recently uploaded a database of the Bible by ftp.
What I want to create is a search engine. What is the simplest way of doing? I have MS office 2000.

If this is the wrong forum where should I ask?
·  hardik
User
Joined: 6 Jul 2004
Total Posts: 2
Search Engine on database
Posted: 30 Jul 2004
Hello dear,

I give one solution for creating the search engine.

For example you have three fields, field1, field2, field3 in table1. Following code is useful for you.


code is in asp

<html>
<body>

<%
if request.form("mode") = "search" then
dim cn
dim rs
set cn = server.createobject("adodb.connection")
set rs = server.createobject("adodb.recordset")
cn.open "provider=microsoft.jet.oledb.4.0;data source=path of mdb file"
rs.open "select * from table1 where " & request.form("field") & "='%" & request.form("searchvalue") & "%'", cn, 1, 2
while not rs.eof
response.write rs.field(1)
rs.movenext()
wend
rs.close
cn.close
end if


%>

<form name=frm1 method=post>
<select name="field">
<option value="field1">Field 1</option>
<option value="field2">Field 2</option>
<option value="field3">Field 3</option>
</select>
<input type="text" name="searchvalue" value="">
<input type="hidden" name="mode" value="search">
<input type="submit" value="Search">
</form>


</body>
</html>


Hello friend, i not run this code, but i create search engine thus i give solution.

Some changes are required according to your requirement.


If more detail required then mail to me on : hardikpatel_se@rediffmail.com


From,
Hardik Patel

(Email ID : hardikpatel_se@rediffmail.com)

Hardik Patel
India
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
1 Visitor

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.