有无试过直接这样执行?这样也会出错吗?
strSql="delete from learning where articleid=2"
conn.execute strSql
另外,只是delete这样吗?其他的select,insert,update操作有无试过?数据库的连接上有无问题?会出现“此處需要物件”通常是由于缺少操作对象等引起的,并不一定是语句上面的错误,尤其是asp代码,提示这样错误往往是由其他地方引起的。
conn.execute"delete from learning where articleid="&request("id")
改成
id=request("id")
如果id是字符串类型就改成这样
conn.execute"delete from learning where articleid='"&id&"'"
如果id是数字类型
conn.execute"delete from learning where articleid="&id