您的位置:首页 >> 数据库 >> Access >> 正文
RSS
 

创建一个空数据库

http://www.rdxx.com 06年05月12日 19:17 不详 我要投稿

关键词: 空数据库 , 创建 , 数据
Function CreateNormalDB(strPathName As String) As Boolean
On Error GoTo Exit_ERR
Dim wrkDefault As Workspace
Dim NewDB As Database

CreateNormalDB = False
Set wrkDefault = DBEngine.Workspaces(0)
If Dir(strPathName) <> "" Then Kill strPathName
Set NewDB = wrkDefault.CreateDatabase(strPathName, dbLangGeneral)

NewDB.Close
Set NewDB = Nothing

CreateNormalDB = True
Exit Function

Exit_ERR:
MsgBox "备份失败!" & vbCrLf & vbCrLf & Err.Description, vbExclamation
Exit Function
End Function

'调用时只需提供路径及文件名即可,此函数为备份数据模块的一部份


 
 
标签: 空数据库 , 创建 , 数据 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站