by Kashif Nsiar (1 Submission)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Wed 28th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Find the record in data base by name
<body>
<form action="search.asp" method="get/post">
Enter the first name<input type=text name=t1>
<input type=submit value="Show">
----------------------------------
<%
'Asp code
name=request.querystring("t1")
'connecting to data base
set cn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
cn.open "dsn=mcs225;uid=admin;pws=";
'Data base connected
set rs=cn.execute("select * from users where name='"&name&"'") 'user is table
if rs.eof=true then
response.write("The require user"&name&"is not available in data base")
else
response.write("<b>"&rs("address")&"</b>")'pick the address from data base
end if
'So this is the little code to find the record it u have any difficulty is asp u can mail me on :[email protected]