<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>www.111cn.net Tutorials </title>
<style>
td{
font-size:12px;
}
</style>
<body>
<table width= "border=" 0 "cellspacing=" 0 "cellpadding=" 0 ">
<form id= "Form1" Name= "Form1" method= "Post" action= "getall.asp" >
<tr>
<td><input name= "keyword" type= "text" id= "keyword"/>
<input type= "Submit" name= "Submission" value= "submitted"/></td>
</tr>
</form>
</table>
</body>
Find Code
<!--#include file= "adoconn.asp"-->
<%
Keyword=request ("keyword")
On Error Resume Next
Set Rs=conn.openschema (20)
K=0
Do Until Rs. Eof
If RS (3) = "TABLE" Then
Set Rs1=server. CreateObject ("Adodb.recordset")
Tablename=rs (2)
Sql= "SELECT * from [" &tablename&] "
Set rs1=conn.execute (SQL)
C=1
Do as not rs1.eof
For I=0 to Rs1.fields.count-1
Key=rs1.fields (i). Name
Value=rs1 (CSTR (key))
If InStr (value,keyword) >0 Then
K=1
Response.Write "Found: Table name:" &tablename& ", Field name" &key& ", section" &c& "Record," &rs1.fields (0). "Name & "=" &rs1 (rs1.fields (0). Name) & "<br>www.111cn.net"
End If
Next
C=c+1
Rs1.movenext
Loop
End If
Rs. MoveNext
Loop
If k=0 Then Response.Write "Sorry, didn't find!!! "
Set rs=nothing
Set conn=nothing
%>
Data Connection File
<%
db= "Database/myfuture_empty.mdb"
Set FSO = Server.CreateObject ("Scripting.FileSystemObject")
If FSO. FolderExists (server. MapPath ("include")) =false Then
Db= ". /"&db
End If
Set fso=nothing
Path=server.mappath (DB)
Set Conn=server.createobject ("ADODB. Connection ")
Connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" &path
Conn. Open ConnStr
Set Rs=server. CreateObject ("Adodb.recordset")
%>
<!--#include file= "function.asp"-->