<%
Dim name,leibie,re
leibie=request.form("name")
name=request.form("part")
set conn=server.createobject("adodb.connection")
conn.open " driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data\tellist.mdb")
if name="bumen" then
re="select * from telcheaklist where bumen="&leibie
elseif
name="danwei" then
re="select * from telcheaklist where danwei="&leibie
elseif
name="name" then
re="select * from telcheaklist where name="&leibie
elseif
name="fenji" then
re="select * from telcheaklist where fenji="&leibie
elseif
name="jianma" then
re="select * from telcheaklist where jianma="&leibie
else
response.write("不可以真接进这个页面,<a href=cha.asp>回去吧</a>写清你的来意再进来,我会照办的")
end if
set rs=conn.execute (re)
do while (not rs.eof)
response.write"<tr>"
response.write"<td>"&rs("bumen")&"</td>"
response.write"<td>"&rs("danwei")&"</td>"
response.write"<td>"&rs("name")&"</td>"
response.write"<td>"&rs("fenji")&"</td>"
response.write"<td>"&rs("jianma")&"</td>"
response.write"</tr>"
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set rs=nothing
%>