ASP 提示非法賦值的解決方法
分析可能是: asp的一些保留字段導致,具體的大家可以參考這篇文章:ASP常見的保留字整理
正常來說 代碼沒問題```ID也有值 但是庫改成了SQL SERVER庫 因不長用所以請教各位這個錯誤是哪里問題
Microsoft VBScript 運行時錯誤 錯誤 '800a01f5'
非法賦值: 'SqlStr'
/admin/list/savedate.asp,行60
錯誤行代碼 SQLstr="delete d_31 where id="&id&""
<%
'刪除小類信息
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
換個變量名試試,還有SQL語句要改一下
SQLstr="delete d_31 where id="&id&""
conn.Execute
SQLstr 改成
dim sqlssqls = "delete from d_31 where id=" & clng(id)
conn.Execute(sqls)
相關文章
ASP調用遠程XML數(shù)據(jù)的代碼(alexa排名數(shù)據(jù))
調用網(wǎng)易新聞的XML數(shù)據(jù)為例進行講解如果通過ASP遠程調取XML文件,并讀出數(shù)據(jù)。其實我們之前就使用了asp讀取alexa官方的數(shù)據(jù)。2011-09-09
FpHtmlEnCode 函數(shù)之標題過濾特殊符號的代碼
FpHtmlEnCode 函數(shù)之標題過濾特殊符號的代碼...2007-09-09
實例分析之用ASP編程實現(xiàn)網(wǎng)絡內容快速查找的代碼
實例分析之用ASP編程實現(xiàn)網(wǎng)絡內容快速查找的代碼...2007-03-03

