这是我在logon.asp的代码
<form name=reg action="add.asp" method="post">
<p>用户名<input type="text" name="username" size="15"> </p>
<p>密 码<input type="text" name="userpassword" size="15"></p>
<input type="submit" name="login" value="登陆">
</form>
以下是我在add.asp中的代码
<!--#include file="connection.asp" -->
<%
dim strname
dim strpwd
dim sql
dim icount
strname=trim(request.form("username"))
strpwd=trim(request.form("userpassword"))
if strname<>"" then
sql="select userpassword from USER where username='" & strname & "'" //11行
rs.open sql,conn,1,1
icount=rs.recordcount
else
'"you should enter your username"
response.redirect("logon.asp")
end if
if icount<>0 or rs("userpassword")="" then
'msgbox "you didn't regeisted now"
response.redirect("regeist.asp")
end if
rs.close
sql="select * from USER"
rs.open sql,conn,3,2
rs.addnew
rs("userid")=icounnt+1
rs("userename")=strname
rs("userpassword")=strpwd
rs.update
%>
<table width="176" border="1">
<tr>
<td>
注册成功<a href="index.asp?userid=<%=rs("userid")%>"> 进入主页</a>
</td>
</tr>
</table>
题是错误的时候总是说
Microsoft JET Database Engine 错误 '80040e10' 11行 from 语句有错误
<form name=reg action="add.asp" method="post">
<p>用户名<input type="text" name="username" size="15"> </p>
<p>密 码<input type="text" name="userpassword" size="15"></p>
<input type="submit" name="login" value="登陆">
</form>
以下是我在add.asp中的代码
<!--#include file="connection.asp" -->
<%
dim strname
dim strpwd
dim sql
dim icount
strname=trim(request.form("username"))
strpwd=trim(request.form("userpassword"))
if strname<>"" then
sql="select userpassword from USER where username='" & strname & "'" //11行
rs.open sql,conn,1,1
icount=rs.recordcount
else
'"you should enter your username"
response.redirect("logon.asp")
end if
if icount<>0 or rs("userpassword")="" then
'msgbox "you didn't regeisted now"
response.redirect("regeist.asp")
end if
rs.close
sql="select * from USER"
rs.open sql,conn,3,2
rs.addnew
rs("userid")=icounnt+1
rs("userename")=strname
rs("userpassword")=strpwd
rs.update
%>
<table width="176" border="1">
<tr>
<td>
注册成功<a href="index.asp?userid=<%=rs("userid")%>"> 进入主页</a>
</td>
</tr>
</table>
题是错误的时候总是说
Microsoft JET Database Engine 错误 '80040e10' 11行 from 语句有错误
解决方案 »
- 有没有好的mvc设计的项目源码
- ASP.NET输入的时候既可输入文本,又可输入图片
- 不知道怎么说问题?
- 在线等!问个小问题!
- 如何制作ASP.NET安装包
- 在线等待:关于图片上放数据库数据的问题
- asp.net的连操作,帮忙看一下
- 怎么得到客户端登陆用户的域名?请高手帮忙,急
- SqlCommand.ExecuteReader()为何不能在执行存储过程时同时返回查询结果基和OutPut引用参数。
- 怎样取得一个 drv.Row["f_fbpbm"].ToString 返回字符串的长度???
- 如何将Oracle数据用InstallShield和程序一起打包?
- 页面如何访问自定义控件中web控件!!!
[USER]
[USER]
select userpassword from USER
会报
服务器: 消息 156,级别 15,状态 1,行 1
在关键字 'USER' 附近有语法错误。所以改个关键字吧