求救: 请高手看一下,为何每次执行都说update语句语法错,下面的表里有些字段为空,直接提交的
asp页面1
<form id="form2" name="form2" method="post" action="ss.asp">
<table width="98%" border="0" cellspacing="1" bgcolor="#39867B" class="font1">
<tr>
<td height="22" colspan="3" bgcolor="#C7EDDF"> 会员资料:</td>
</tr>
<%
if not recordset1.eof then
%> <tr>
<td width="36%" height="22" bgcolor="#FFFFFF"> 会员编号:
<input name="id" type="text" value="<%=(Recordset1.Fields.Item("vip_id").Value)%>" size="24" maxlength="11" /></td>
<td width="36%" bgcolor="#FFFFFF"> 会员昵称:
<input name="name1" type="text" value="<%=(Recordset1.Fields.Item("vip_name1").Value)%>" size="24" maxlength="16" /></td>
<td width="28%" rowspan="9" bgcolor="#FFFFFF"><div align="center"><%=(Recordset1.Fields.Item("vip_head").Value)%></div></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> 登陆密码:
<a href="admin_vipactive.asp?revert="<%=(Recordset1.Fields.Item("vip_id").Value)%>"">还原密码</a></td>
<td bgcolor="#FFFFFF"> 帐户余额:
<input name="advance" type="text" value="<%=(Recordset1.Fields.Item("vip_advance").Value)%>" size="24" maxlength="9" readonly="true" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> 会员名字:
<input name="name" type="text" value="<%=(Recordset1.Fields.Item("vip_name").Value)%>" size="24" maxlength="8" /></td>
<td bgcolor="#FFFFFF"> 会员财富:
<input name="cf" type="text" value="<%=(Recordset1.Fields.Item("vip_money").Value)%>" size="24" maxlength="9" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> 联系电话:
<input name="phone" type="text" value="<%=(Recordset1.Fields.Item("vip_phone").Value)%>" size="24" maxlength="11" /></td>
<td bgcolor="#FFFFFF"> 会员信用值:
<input name="credit" type="text" value="<%=(Recordset1.Fields.Item("vip_credit").Value)%>" size="24" maxlength="9" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> 电子邮件:
<input name="mail" type="text" value="<%=(Recordset1.Fields.Item("vip_mail").Value)%>" size="24" maxlength="32" /></td>
<td bgcolor="#FFFFFF"> 累计消费:
<input name="sumoney" type="text" value="<%=(Recordset1.Fields.Item("vip_summoney").Value)%>" size="24" maxlength="9" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> 注册时间:
<input name="time1" type="text" value="<%=(Recordset1.Fields.Item("vip_time").Value)%>" size="24" maxlength="16" /></td>
<td bgcolor="#FFFFFF"> 会员等级:
<input name="cls" type="text" value="<%=(Recordset1.Fields.Item("cls_name").Value)%>" size="24" maxlength="24" readonly="true" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> QQ:
<input name="qq" type="text" value="<%=(Recordset1.Fields.Item("vip_qq").Value)%>" size="24" maxlength="11" /></td>
<td bgcolor="#FFFFFF"><table width="290" border="0" cellspacing="0">
<tr>
<td width="90"><div align="right">是否锁定:</div></td>
<td width="196"><table width="72%" height="20" border="0" cellspacing="0">
<tr>
<td width="28%"><div align="right">是:</div></td>
<td width="11%"><input <%If (CStr((Recordset1.Fields.Item("vip_islocked").Value)) = CStr("1")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="islocked" value="1" /></td>
<td width="28%"><div align="right">否:</div></td>
<td width="33%"><input <%If (CStr((Recordset1.Fields.Item("vip_islocked").Value)) = CStr("0")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="islocked" value="0" /></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"> MSN:
<input name="msn" type="text" value="<%=(Recordset1.Fields.Item("vip_msn").Value)%>" size="24" maxlength="16" /></td>
<td bgcolor="#FFFFFF"> IP地址:
<input name="ip" type="text" value="<%=(Recordset1.Fields.Item("vip_ip").Value)%>" size="24" maxlength="16" readonly="true" /></td>
</tr>
<tr>
<td height="22" colspan="2" bgcolor="#FFFFFF"> 会员住址:
<input name="address" type="text" value="<%=(Recordset1.Fields.Item("vip_address").Value)%>" size="62" maxlength="60" /></td>
</tr>
<tr>
<td height="22" colspan="2" bgcolor="#FFFFFF"><div align="center">
<select name="active">
<option value="3">更新</option>
<option value="4">删除</option>
</select>
<input type="submit" name="Submit2" value="提交" />
</div></td>
<td width="28%" bgcolor="#FFFFFF"><div align="center">上传头像</div></td>
</tr>
<%
else
response.write("<Script>alert('对不起,您要的纪录不存在!');javascript:history.back();</script>")
end if
%>
</table>
</form>
-------------------------------------------------------------------------------------------------------------------------
ss.asp页面:
dim vipid,vipname,name1,phone,mail,time1,qq,msn,address,advance,cf,cridet,sumoney,cls,islocked
vipid=trim(request("id"))
vipname=trim(request("name"))
name1=trim(request("name1"))
phone=trim(request("phone"))
mail=trim(request("mail"))
time1=trim(request("time1"))
qq=trim(request("qq"))
msn=trim(request("msn"))
address=trim(request("address"))
'advance=trim(request("advance"))
cf=trim(request("cf"))
credit=trim(request("credit"))
sumoney=trim(request("sumoney"))
'cls=trim(request("cls"))
islocked=trim(request("islocked"))
sql="update shop_vip set vip_id="&vipid&",vip_name="&vipname&",vip_name1="&name1&",vip_phone="&phone&",vip_mail="&mail&",vip_time1="&time1&",vip_qq="&qq&",vip_msn="&msn&",vip_address="&address&",vip_cf="&cf&",vip_credit="&credit&",vip_summoney="&sumoney&",vip_islocked="&islocked&" where vip_id="&vipid
conn.execute sql
response.redirect("pp.asp?vipid="&vipid&"")