判断表是否存在的函数 |
|
www.nanhushi.com 佚名 不详 |
'******************** Code Start ************************ ' This code was originally written by Dev Ashish. ' It is not to be altered or distributed, ' except as part of an application. ' You are free to use it in any application, ' provided the copyright notice is left unchanged. ' ' Code Courtesy of ' Dev Ashish ' ' Function fExistTable(strTableName As String) As Integer Dim db As Database Dim i As Integer Set db = DBEngine.Workspaces(0).Databases(0) fExistTable = False db.TableDefs.Refresh For i = 0 To db.TableDefs.Count - 1 If strTableName = db.TableDefs(i).Name Then 'Table Exists fExistTable = True Exit For End If Next i Set db = Nothing End Function '******************** Code End ************************
|
|
|
文章录入:杜斌 责任编辑:杜斌 |
|
上一篇文章: access操作excel数据并保存预览打印并退出 下一篇文章: 不同mdb单个表的数据库链接 |
【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
|