清醒时做事,糊涂时读书,大怒时睡觉,无聊时关注图老师为大家准备的精彩内容。下面为大家推荐创建一个带口令地空数据库,无聊中的都看过来。
【 tulaoshi.com - 编程语言 】
Function CreatePassWordDB(strPathName As String, strPsd As String) As Boolean
On Error GoTo Exit_ERR
Dim wrkDefault As Workspace
Dim NewDB As Database
CreatePassWordDB = False
Set wrkDefault = DBEngine.Workspaces(0)
If Dir(strPathName) "" Then Kill strPathName
Set NewDB = wrkDefault.CreateDatabase(strPathName, dbLangGeneral & ";pwd=" & strPsd & "")
NewDB.Close
Set NewDB = Nothing
CreatePassWordDB = True
Exit Function
Exit_ERR:
MsgBox "备份失败!" & vbCrLf & vbCrLf & Err.Description, vbExclamation
Exit Function
End Function
来源:http://www.tulaoshi.com/n/20160219/1615440.html
看过《创建一个带口令地空数据库》的人还看了以下文章 更多>>