为什么我在网页上输入要求加入数据库的内容就提示下面的信息
错误类型:
Microsoft JET Database Engine (0x80040E09)
不能更新。数据库或对象为只读。
/jecom/Star0202.asp, 第 54 行
这是怎么回事,麻烦那位高手给我指点一下?
谢谢了!
下面是程序
<%@ Language=JScript %>
<!-- #include file="proc/StarProc.inc" -->
<%
var objRs, strRs, strToday;
var intI, intAge, intAgevalue;
var intShopNum, strMsg;
var strAgeArray = new Array('20 以下', '20 ~ 29', '30 ~ 39',
'40 ~ 49', '50 ~ 59', '60(含)以上');
strToday = getToday();
if(Request('UserID') == '' || Request('Pswd') == '' ||
Request('RecPswd') == '' || Request('name') == '' ||
Request('address') == '') {
strMsg = '粗体字之栏位未输入';
Response.Redirect('Star0102.asp?msg=' + strMsg);
}
else {
if(Request('Pswd')(1) != Request('RecPswd')(1)) {
strMsg = '通行码与确认通行码应该相同';
Response.Redirect('Star0102.asp?msg=' + strMsg);
}
}
strRs = 'SELECT * ' +
'FROM shopID ' +
'WHERE userID = \'' + Request('UserID')(1) + '\'';
objRs = Server.CreateObject('ADODB.Recordset');
objRs.open(strRs, Application('strCn'));
if(! objRs.EOF) {
objRs = null;
strMsg = '识别名称重复,请另设定';
Response.Redirect('Star0102.asp?msg=' + strMsg);
}
objRs.Close();
strRs = 'SELECT * ' +
'FROM shopID ' +
'ORDER BY shopNo';
objRs.Open(strRs, Application('strCn'), 2, 2);
if(objRs.EOF) {
intShopNum = 1;
}
else {
objRs.MoveLast();
intShopNum = objRs.Fields('shopNo').value + 1;
}
objRs.AddNew();
objRs('userID') = Request('UserID');
objRs('password') = Request('Pswd');
objRs('shopNo') = intShopNum;
objRs.Update();
objRs.Close();
objRs.Open('shopper', Application('strCn'), 2, 2);
for(intI = 0; intI < strAgeArray.length; intI++) {
if(Request('age') == strAgeArray[intI]) {
intAge = intI;
break;
}
}
if(intAge == 0) {
intAgevalue = 19;
}
else {
intAgevalue = (intAge + 1) * 10;
}
objRs.AddNew();
objRs('shopNo') = intShopNum;
objRs('name') = Request('name');
objRs('tel') = Request('tel');
objRs('address') = Request('address');
objRs('email') = Request('mail');
objRs('sex') = Request('sex');
objRs('age') = intAgevalue;
objRs('regDate') = strToday;
objRs.Update();
Response.Cookies('strLogonSuccess') = 'OK';
putUser(objRs);
objRs = null;
%>
<html>
<body>
<center>
<h2 style="color
live">
<% = getUser() %>您已成功加入会员,请准备购物。</h2>
<hr>
</center>
<table align="center">
<tr>
<td colspan="2">本网站购物</td>
</tr>
<tr>
<td width="40"></td>
<td>满 NT$
<font color="deepskyblue">1,500</font> 元可享
<font color="blue">九五</font> 折,
</td>
<tr>
<td width="40"></td>
<td>满 NT$
<font color="darkcyan">3,000</font> 元可享
<font color="green">九</font> 折,
</td>
</tr>
<tr>
<td width="40"></td>
<td>满 NT$
<font color="coral">5,000</font> 元可享
<font color="red">八五</font> 折优惠,
</td>
</tr>
<tr>
<td colspan="2" align="center">请多多利用!</td>
</tr>
</table>
<%
showLogo();
%>
</body>
</html>