searge page
I must key in FirstName, LastName and IcNo to searching, and it will display the data from member, how to do it? Can u please modify my coding? It display nothing and why display the admin MemberId? Pls show me clearer..
My coding showing below:
<%
'open the database connection
Set con=Server.CreateObject("ADODB.Connection")
'con.open "Provider=SQLOLEDB.1; Password=; UserID=BOO; Initial Catalog=dta; Data Source=webserver;"
con.open "DSN=dta"
Set rs=Server.CreateObject("ADODB.Recordset")
rs.CursorType=adOpenStatic
rs.CursorLocation=adUseServer
rs.LockType=adLockBatchOptimistic
if trim(request.form("FirstName"))<> " " and _
trim(request.form("LastName"))<> " " and _
trim(request.form("IcNo"))<> " " then
sql= "Select * from Member where FirstName=' " &_
trim(request.form("SFirstName")) &_
"' and LastName='" & trim(request.form("SLastName")) &_
"' and IcNo='" & trim(request.form("SIcNo")) & "'"
else
response.redirect "Error_no_record.asp"
end if
con.close
set con=nothing
set rs=nothing
%>
|