Dear Experts,
I have ASP search below but it displays all the Recordset. Pls help me to Edit the Code....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<head>
<title>Search ASP</title>
</head>
<body>
<% Set MyConn=Server.CreateObject("ADODB.Connection"
MyConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=" & server.mappath("personal.mdb"
MySQL="Select * from tblper Where Name Like '%" & txtfind & "%' Order by Name"
Set MyRs=MyConn.Execute(MySQL)
%>
<table border="1">
<tr bgcolor=""><% 'Put Headings On The Table of Field Names
howmanyfields=MyRs.fields.count -1 %>
<% for i=0 to howmanyfields %>
<td><b><font color=""><%=MyRs(i).name %></font> </b></td>
<% next %>
</tr>
<% ' Get all the records
do while not MyRs.eof %>
<tr bgcolor="">
<% for i = 0 to howmanyfields
ThisRecord = MyRs(I)
If IsNull(ThisRecord) Then
ThisRecord = " "
end if %>
<td valign=top><font color=""><%=Thisrecord%></font></td><% next %>
</tr>
<%MyRs.movenext
loop%>
</table>
<%
MyRs.close
Set MyRs= Nothing
MyConn.Close
set MyConn=nothing
%>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
here is my HTML form
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<html>
<head>
<title>Search HTML</title>
</head>
<body>
<form method="GET" action="find.asp">
<p><input type="text" name="txtfind" size="18">
<input type="submit" value="Find" name="B1"></p>
</form>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Joel,
I have ASP search below but it displays all the Recordset. Pls help me to Edit the Code....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<head>
<title>Search ASP</title>
</head>
<body>
<% Set MyConn=Server.CreateObject("ADODB.Connection"
MyConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=" & server.mappath("personal.mdb"
MySQL="Select * from tblper Where Name Like '%" & txtfind & "%' Order by Name"
Set MyRs=MyConn.Execute(MySQL)
%>
<table border="1">
<tr bgcolor=""><% 'Put Headings On The Table of Field Names
howmanyfields=MyRs.fields.count -1 %>
<% for i=0 to howmanyfields %>
<td><b><font color=""><%=MyRs(i).name %></font> </b></td>
<% next %>
</tr>
<% ' Get all the records
do while not MyRs.eof %>
<tr bgcolor="">
<% for i = 0 to howmanyfields
ThisRecord = MyRs(I)
If IsNull(ThisRecord) Then
ThisRecord = " "
end if %>
<td valign=top><font color=""><%=Thisrecord%></font></td><% next %>
</tr>
<%MyRs.movenext
loop%>
</table>
<%
MyRs.close
Set MyRs= Nothing
MyConn.Close
set MyConn=nothing
%>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
here is my HTML form
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<html>
<head>
<title>Search HTML</title>
</head>
<body>
<form method="GET" action="find.asp">
<p><input type="text" name="txtfind" size="18">
<input type="submit" value="Find" name="B1"></p>
</form>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Joel,