在同一个asp中要多次用到它,但是里面只是参数name不同。所以想写个函数
然后把参数传进去。
cmd="select * from table1 where id1="+name+""
set rs1=conn.execute(cmd)
if not rs1.eof then
cmd="update table2 set isbool=Fwhere id1="+name+""
conn.execute(cmd)
end if
Private Sub theFunction(Byval name)
cmd="select * from table1 where id1="+name+""
set rs1=conn.execute(cmd)
if not rs1.eof then
cmd="update table2 set isbool=Fwhere id1="+name+""
conn.execute(cmd)
end if
End Sub
这样调用就可以了:
CALL theFunction("123")