Microsoft OLE DB Provider for SQL Server 错误 '80040e14'

Microsoft OLE DB Provider for SQL Server 错误 '80040e14'第 1 行: ',' 附近有语法错误。/select.asp,行 1107

sql_log_basic="insert into user_shop_log (shop_sn,straccount_buy,struserid_buy,straccount_sale,struserid_sale,itemvalue,snum,spicnum1,strname,btype,barm,sab1,sab2,swt,sdur,stime,sspecial,regsn,supgrade,sspopt1,sspopt2,sspopt3,counts,price,tax,action_type,action_sql,addtime) "
sql_log_basic=sql_log_basic&" values('"&shop_sn&"','"&username&"','"&charname&"','商城','',cast(0x"&itemvalue&" as char(100)),10014,"&spicnum1&",'"&shop_strname&"',"&btype&","&barm&",0,0,0,"®sdur&","®stime&","&sspecial&",'"®_sn&"',"&supgrade&",0,0,0,1,"&pricefinal&","&pricefinal&",'action_type','action_sql','"&now()&"')"
'1.交付
sql_godstone_buyer="update gameuser_godstone set GodStone=GodStone-"&pricefinal&" where struserid='"&username&"'"
sql_log=Replace(sql_log_basic,"'action_type'","'1.交付'")
If price_cost>0 then
sql_log=Replace(sql_log,"'action_sql'","'物品编号"&snum_src&"/"&return_info&"/当前爱心"&godstone&"/积分消耗"&price_cost*100&"/"&Replace(sql_godstone_buyer,"'","|")&"'")
Else
sql_log=Replace(sql_log,"'action_sql'","'物品编号"&snum_src&"/"&return_info&"/当前爱心"&godstone&"/积分消耗"&price_cost*100&"(未启用)/"&Replace(sql_godstone_buyer,"'","|")&"'")
End If
'response.write sql_log
connsoma.execute(sql_log) ;就是这行出错
connsoma.execute(sql_godstone_buyer)
大神帮帮忙看应该怎么修改

Microsoft OLE DB Provider for SQL Server 错误 '80040e14'第 1 行: ',' 附近有语法错误。/select.asp,行 1107
这就是错。看你的1107行,是怎么写的。追问

'response.write sql_log
connsoma.execute(sql_log) ;这就是1107行
connsoma.execute(sql_godstone_buyer)

追答

建议从insert into语句这里入手,应该是语法有问题。

可以加个断点,看下最后生成的sql_log是否可以在数据库中执行。

温馨提示:答案为网友推荐,仅供参考
相似回答