ASP读取数据库字段
我需要读取一个数据库某表里面的某个字段,应该如何实现<!--#includefile="conn.asp"--><head><metahttp-equiv="Conten...
我需要读取一个数据库某表里面的某个字段,应该如何实现
<!--#include file="conn.asp" -->
<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#000000" scroll=no >
<form id="form1" name="form1" method="post" action="reg2.asp">
<table border="1" width="324" height="220" background="image/bg.jpg" cellspacing="1" style="border-collapse: collapse; color: #FFFFFF; font-size:10pt">
<tr>
<td><%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from cabal_auth_table where ID='"&request.form("id")&"'",conn,1,3
if rs.recordcount>0 then
response.write("用户名:"&request.form("id")&"已经存在,请按后退再重新填写!")
rs=close
set rs=nothing
conn.close
set conn=nothing
response.end
else
rs.close
Conn.Execute "exec dbo.cabal_tool_registerAccount '"&request.form("id")&"','"&request.form("pd")&"'"
response.write("恭喜你,"&request.form("id")&"注册成功!")
end if
%></td>
</tr>
</table>
</form>
这段代码应该如何修改?不懂ASP`!- - 展开
<!--#include file="conn.asp" -->
<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#000000" scroll=no >
<form id="form1" name="form1" method="post" action="reg2.asp">
<table border="1" width="324" height="220" background="image/bg.jpg" cellspacing="1" style="border-collapse: collapse; color: #FFFFFF; font-size:10pt">
<tr>
<td><%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from cabal_auth_table where ID='"&request.form("id")&"'",conn,1,3
if rs.recordcount>0 then
response.write("用户名:"&request.form("id")&"已经存在,请按后退再重新填写!")
rs=close
set rs=nothing
conn.close
set conn=nothing
response.end
else
rs.close
Conn.Execute "exec dbo.cabal_tool_registerAccount '"&request.form("id")&"','"&request.form("pd")&"'"
response.write("恭喜你,"&request.form("id")&"注册成功!")
end if
%></td>
</tr>
</table>
</form>
这段代码应该如何修改?不懂ASP`!- - 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询