菜鸟网络工人招聘:谁能给我一个ASP打开表的自定义函数~!谢谢!~

来源:百度文库 编辑:高校问答 时间:2024/04/28 22:55:24
谁能给我一个ASP打开表的自定义函数~!谢谢!~
这样让我每次打开表的时候就调用就可以了,有没有啊~!
sub openbiao(biaoming,rs,fangshi)
id=request("id")
if biaoming="" then biaoming=diary end if
if rs="" then rs=rs end if
if fangshi="" then fangshi=1 end if
sql="select * from diary"
if id<>"" then
sql="select * from diary where id="&id
end if
set rs= Server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
end sub
这样的,我写的,但是错误

ID是不是数字类型?

sql="select * from diary where id = clng("&id&")"