分析可能是: asp的一些保留字段導(dǎo)致,具體的大家可以參考這篇文章:ASP常見的保留字整理
正常來說 代碼沒問題```ID也有值 但是庫改成了SQL SERVER庫 因不長用所以請(qǐng)教各位這個(gè)錯(cuò)誤是哪里問題
Microsoft VBScript 運(yùn)行時(shí)錯(cuò)誤 錯(cuò)誤 '800a01f5'
非法賦值: 'SqlStr'
/admin/list/savedate.asp,行60
錯(cuò)誤行代碼 SQLstr="delete d_31 where id="id""
復(fù)制代碼 代碼如下:
%
'刪除小類信息
sub delbuy()
id=clng(Request.QueryString("id"))
Set book=server.createobject("adodb.recordset")
SQLstr="delete d_31 where id="id""
conn.Execute SQLstr
set book=nothing
conn.close
set conn=nothing
%>
SCRIPT LANGUAGE=vbscript>
!--
msgbox("刪除成功!")
window.location.href="buySoScan.asp"
-->
/SCRIPT>
%
end sub
%>
解決方法:SQLstr 改成sqlssqls
換個(gè)變量名試試,還有SQL語句要改一下
復(fù)制代碼 代碼如下:
SQLstr="delete d_31 where id="id""
conn.Execute
SQLstr 改成
復(fù)制代碼 代碼如下:
dim sqlssqls = "delete from d_31 where id=" clng(id)
conn.Execute(sqls)