删除不了?? 在线等...急
我做了一个简单的删除功能..但删除不了...
代码如下:
<%
way=request.QueryString( "way ")
no=request.QueryString( "no ")
if way=2 then
set rs=conn.execute( "delete from [client] where no= "&no& " ")
set rs=nothing
end if
%>
<td align= "center "> <a href= "clientM.asp?way=2&no= <%=rs( "no ")%> "> 删除 </a> </td>
用连接来删除..
很奇怪, 按删除后, 数据没变化.亦删除不了. 但在其它页可以.为什么?
------解决方案--------------------conn.execute "delete from client where no= "&no
如果上面的不行的话,看看no字段是什么类型
字符型:conn.execute "delete from [client] where no= ' "&no & " ' "
数值型:conn.execute "delete from [client] where no= "&cint(no)
------解决方案-------------------- <%
way=request.QueryString( "way ")
no=request.QueryString( "no ")
'看看way和no的值是不是存在,如果way为空或者不等于2的话,也是不能删除的
Reponse.Write way & " <br> "
Reponse.Write no & " <br> "
if way=2 then
conn.execute "delete from [client] where no= "&cint(no)
set rs=nothing
end if
%>