急~~~~!请问各位大吓~!一个ASP问题~!
我这个ASP文件是用人提交表单到数据库的~!可在提交的时候为什么不能提交成功呢?
IE上显示:
错误类型:
Microsoft JET Database Engine (0x80040E09)
不能更新。数据库或对象为只读。
/CH15/MEMBER/Addmember.asp, 第 26 行
我的ASP源码是:
<!-- #include file="ADOFunctions.asp" -->
<%
Dim Id, Password, Name, Sex, Year, Month,Day
Dim TelPhone, CellPhone, Address, Email, Url, Comment
Id = Request("Id")
Password = Request("Password")
Name = Request("Name")
Sex = Request("Sex")
Year = Request("Year")
Month = Request("Month")
Day = Request("Day")
TelPhone = Request("TelPhone")
CellPhone = Request("CellPhone")
Address = Request("Address")
Email = Request("Email")
Url = Request("Url")
Comment = Request("Comment")
Dim objRS,strSQL
strSQL = "SELECT * FROM Users Where Id='" & Id & "'"
Set objRS= GetSQLRecordset(strSQL, "data.mdb", "Users")
'翻查帐号是否有人申请,没有就新增记录
If objRS.EOF Then
'新增记录
objRS.AddNew Array("Id", "Password", "Name", "Sex", "Year", "Month", "Day", _
"TelPhone", "CellPhone", "Address", "Email", "Url", "Comment"), _
Array(Id, Password, Name, Sex, Year, Month, Day, TelPhone, _
CellPhone, Address, Email, Url, Comment)
objRS.Update
'关闭数据库连接并释放对象
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
<HTML>
<BODY BGCOLOR="#FFFFFF">
<P ALIGN="CENTER"><IMG SRC="Success.jpg">
<P ALIGN="CENTER">恭喜您已经注册成功了,您的资料如下:(请勿按刷新钮)<BR>
帐号:<FONT COLOR="#FF0000"><% =Id %></FONT><BR>
密码:<FONT COLOR="#FF0000"><% =Password %></FONT><BR>
请记下您的帐号及密码,然后<A HREF="Index.htm">登录网站</A>。</P>
</BODY>
</HTML>
<%Else%>
<SCRIPT LANGUAGE="VBSCRIPT">
<!--
Window.Alert "您所使用的帐号已经被他人注册了,请使用其他帐号。"
History.Back
-->
</SCRIPT>
<%End If%>
<!-- #include file="ADOFunctions.asp" --> 这个文件是没问题的!