在ASP代码中怎么写? 比如: <% set rs=conn.execute("update table set col1='"&bianhao&"' where col2=5") 接着怎么写? %>
select @@ROWCOUNT 没用过asp 不好意思哦
--不懂asp,乱写一通,不要打我! <% dim recordcount conn.execute("update table set col1='"&bianhao&"' where col2=5") set rs=conn.execute("select count(1) as numbers from table where col2=5 and col1='"&bianhao&"'") if not rs.eof() then recordcount=rs!numbers %>
--上面的不对,这样行不行? <% dim recordcount conn.execute("update table set col1='"&bianhao&"' where col2=5") set rs=conn.execute("select numbers from (select @@rowcount as numbers) a") if not rs.eof() then recordcount=rs!numbers else recordcount=0 %>
比如:
<%
set rs=conn.execute("update table set col1='"&bianhao&"' where col2=5")
接着怎么写?
%>
没用过asp 不好意思哦
<%
dim recordcount
conn.execute("update table set col1='"&bianhao&"' where col2=5")
set rs=conn.execute("select count(1) as numbers from table where col2=5 and col1='"&bianhao&"'")
if not rs.eof() then recordcount=rs!numbers
%>
<%
dim recordcount
conn.execute("update table set col1='"&bianhao&"' where col2=5")
set rs=conn.execute("select numbers from (select @@rowcount as numbers) a")
if not rs.eof() then recordcount=rs!numbers else recordcount=0
%>
select @@ROWCOUNT