有没有人能回答啊!!数据库问题
k330j 2003-02-28 12:29:41 登录页面 login.htm
<%@ Language=VBScript %>
<HTML>
<HEAD>
<title>智人仓库管理系统</title>
</HEAD>
<BODY bgcolor=#c1f7d8>
<form action=login.asp method=post>
<table>
<tr>
<td><img src=file://C:\Inetpub\wwwroot\002.gif></td>
</tr>
<tr>
<td width=100% align=center><p><font size=5>员工登录</p></font></td>
</tr>
</table>
<table>
<tr>
<td width=63% align=right height=40>帐号:<br></td>
<td width=50%><input name=name style="height:22px;width:167px"><br></td>
</tr>
<tr>
<td width=63% align=right height=40>密码:<br></td>
<td width=50%><input type=password name=password style="height:22px;width:167px"><br></td>
</tr>
<tr>
<td width=40% align=right height=40><br></td>
<td width=30% align=left>
<input id=submitl name=submitl type=submit value=确定>
<input id=resetl name=resetl type=reset value=重填></td>
</tr>
</table>
</form>
<center> </center>
</BODY>
</HTML>
验证程序 login.asp
<%@ Language=VBScript %>
<%Response.Buffer=true%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<body bgcolor=#clf7d8>
<center>
<%
dim strname,strpassword,sql
strname=Request.Form("name")
strpassword=Request.Form("password")
if strname="" then
Response.Write"帐号不能为空<p></p>"
%>
<a href=javascript:history.back()>上一页</a>
<%
Response.End
end if
if strpassword=""then
Response.Write"密码不能为空<p></p>"
%>
<a href=javascript:history.back()>上一页</a>
<%
Response.End
end if
sql="filedsn=c:\kcgl.dsn"
set dblink=server.CreateObject("adodb.connection")
dblink.Mode=3
dblink.Open sql
set rstemp=server.CreateObject("adodb.recordset")
rstemp.Open sql,"dsn=zyxx;uid=sa;pwd="
if rstemp.RecordCount=1 then
if rstemp("userpassword")=strpassword then
session("name")=strname
Response.Redirect"login.htm"
else
Response.Write"密码错误<br><br>"
end if
else
Response.Write"帐号错误<br><br>"
%>
<a href=javascript:history.back()>上一页</a>
<%
Response.End
end if
rstemp.Close
set rstemp=nothing
%>
</center>
</BODY>
</HTML>
我用的SQL数据库,数据源c:\kcgl.dan,用户信息表zyxx 有username.userpassword两个字段两个都是字符型.登陆页面运行正常.但输入数据就会出现
HTTP 500 - 内部服务器错误
Internet Explorer
我已经问过一次了程序也做了一定修改,但还是不能解决最根本问题,希望高手能仔细看看帮我找找问题,谢谢了