asp我想输入一行中的一项来查询一行,但总输出不出来 15
<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%><!--#includefile="adovbs.inc"--><!DOCTYPEHTMLPU...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="adovbs.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登录</title>
<link rel="stylesheet" href="css/css.css">
</head>
<%
dim con
dim constr
set con=server.CreateObject("adodb.connection")
constr="DRIVER={SQL Server};UID=sa; PWD=hashiqi;database=commend; server=ry-PC;"
con.open constr
Num=request("Num")
PingLun=request("PingLun")
if Num<>"" then
set rs=con.execute("select * from q where number='"&Num&"'",,adCMDText)
if not rs.eof then
session("pinglun2")=rs("pinglun")
session("number2")=rs("number")
end if
rs.close
con.close
end if
%>
<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr align="center">
<td height="22">编号</td>
<td height="22">操 作</td>
</tr>
<form name="form2" method="post" action="checkpoint.asp">
<tr align="center">
<td height="22"><input name="Num" type="text" id="Num" class="textbox"></td>
<td height="22">
<input type="submit" name="Submit2" value="查询" class="button"></td>
</tr>
</form>
</table>
</body>
</html> 展开
<!--#include file="adovbs.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登录</title>
<link rel="stylesheet" href="css/css.css">
</head>
<%
dim con
dim constr
set con=server.CreateObject("adodb.connection")
constr="DRIVER={SQL Server};UID=sa; PWD=hashiqi;database=commend; server=ry-PC;"
con.open constr
Num=request("Num")
PingLun=request("PingLun")
if Num<>"" then
set rs=con.execute("select * from q where number='"&Num&"'",,adCMDText)
if not rs.eof then
session("pinglun2")=rs("pinglun")
session("number2")=rs("number")
end if
rs.close
con.close
end if
%>
<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr align="center">
<td height="22">编号</td>
<td height="22">操 作</td>
</tr>
<form name="form2" method="post" action="checkpoint.asp">
<tr align="center">
<td height="22"><input name="Num" type="text" id="Num" class="textbox"></td>
<td height="22">
<input type="submit" name="Submit2" value="查询" class="button"></td>
</tr>
</form>
</table>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询