最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
判断一个access数据库中某个表是否存在的方法
时间:2022-06-30 10:21:33 编辑:袖梨 来源:一聚教程网
<%
rem x=0 表示不存在,x=1 表示存在
strConn="DBQ="+server.mappath("zw.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set objConn=server.createobject("Adodb.connection")
objConn.open strConn
set rsSchema=objConn.openSchema(20)
rsSchema.movefirst
tablename="gd111"
x=0
Do Until rsSchema.EOF
if rsSchema("TABLE_TYPE")="TABLE" then
if rsSchema("TABLE_NAME")=tablename then
x=1
exit do
end if
end if
rsSchema.movenext
Loop
if x=0 then response.write"没有找到!!!"
if x=1 then response.write"找到了"
set objConn=nothing
%>
rem x=0 表示不存在,x=1 表示存在
strConn="DBQ="+server.mappath("zw.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set objConn=server.createobject("Adodb.connection")
objConn.open strConn
set rsSchema=objConn.openSchema(20)
rsSchema.movefirst
tablename="gd111"
x=0
Do Until rsSchema.EOF
if rsSchema("TABLE_TYPE")="TABLE" then
if rsSchema("TABLE_NAME")=tablename then
x=1
exit do
end if
end if
rsSchema.movenext
Loop
if x=0 then response.write"没有找到!!!"
if x=1 then response.write"找到了"
set objConn=nothing
%>
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16