asp 写不进去数据库!谁可以帮我看看

来源:百度知道 编辑:UC知道 时间:2024/05/11 12:41:36
<%
if request("hid1")="ok" then
nowprice=request("price")
nowhuiyuan=request("huiyuan")
if nowhuiyuan="" then
nowhuiyuan=0
end if
nowid_login=request("id_login")
set rs_login=conn.execute("select * from login where id="&nowid_login)
set rs=server.createobject("ADODB.RecordSet")
if nowhuiyuan<>0 then
conn.execute("update huiyuan set jifen=jifen+"&nowprice&" where id="&nowhuiyuan)
end if
sql="insert into sell(id_login,login,type,selldate,price,price2,id_huiyuan,bianhao) values("&nowid_login&",'"&rs_login("username")&"',0,#"&date()&"#,"&totalprice&","&totalprice2&","&nowhuiyuan&",'"&nowbianhao&"',true)"
conn.execute(sql)
%>
<script language="javascript">
alert("会员消费添

INSERT INTO 语句的语法错误
是不是属性和属性值没对上号,或者多了或少了,看不很清楚

下面两句
写完整了看看
set rs_login=conn.execute("select * from login where id="&nowid_login&"")

conn.execute("update huiyuan set jifen=jifen+"&nowprice&" where id="&nowhuiyuan&"")