Today, when I was writing asp, I was prompted with a Microsoft VBScript runtime error error 800a01f5. Illegal assignment: sitename. After renaming sitename2, the problem was solved.
The analysis may be: caused by some reserved fields of ASP. For details, you can refer to this article: ASP Common Reserved Words Collection
Normally there is no problem with the code```The ID also has a value, but the library was changed to SQL SERVER library because it is not used for a long time, so I would like to ask you what is the problem with this error.
Microsoft VBScript runtime error error '800a01f5'
Illegal assignment: 'SqlStr'
/admin/list/savedate.asp, line 60
Error line code SQLstr=delete d_31 where id=&id&
Copy the code code as follows:<%
'Delete small category information
subdelbuy()
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(Deleted successfully!)
window.location.href=buySoScan.asp
-->
</SCRIPT>
<%
end sub
%>
Solution: Change SQLstr to sqlssqls
Try changing the variable name. There are also SQL statements that need to be changed.
Copy the code code as follows:SQLstr=delete d_31 where id=&id&
conn.Execute
SQLstr changed to
Copy the code code as follows:dim sqlssqls = delete from d_31 where id= & clng(id)
conn.Execute(sqls)