Problem displaying one of the records.
Hi, i haf dis problem of displaying the records according to the id. Can anybody help me on dis? dis is wad i haf... wad m i missing or wer did i go wrong?
<%
Dim Conn, SQL, rs
Dim id, dept
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("emp.mdb")
sID=request.form("id")
SQL="Select * FROM Info WHERE CPAR_No='" & sID & "'"
set rs=Conn.Execute(SQL)
IF not rs.EOF Then
id=rs.Fields("ID")
dept=rs.Fields("Department")
response.write "cpar :" & id
response.write "dept :" & dept
else
response.write "No Record Found"
end if
set rs=Nothing
Conn.Close
set Conn=Nothing
%>
|