生活已是百般艰难,为何不努力一点。下面图老师就给大家分享改变ACCESS数据库的密码,希望可以让热爱学习的朋友们体会到设计的小小的乐趣。
【 tulaoshi.com - 编程语言 】
Public Function ChangeDatabasePassword(DBPath As String, _
newPassword As String, oldPassWord As String) As Boolean
`Usage: Change DatabasePassword
`Parameters: sDBPath: Full Path to Access Database
`newPassword: the password
`oldPassword: the previous password
`returns true on success false otherwise
If Dir(DBPath) = "" Then Exit Function
Dim db As DAO.Database
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)On Error Resume Next
Set db = OpenDatabase(DBPath, True, False, ";pwd=" & oldPassWord)
If Err.Number 0 Then Exit Function
db.newPassword oldPassWord, newPassword
ChangeDatabasePassword = Err.Number = 0
db.Close
End Function
来源:http://www.tulaoshi.com/n/20160219/1604494.html
看过《改变ACCESS数据库的密码》的人还看了以下文章 更多>>