【发布时间】:2011-02-10 05:29:01
【问题描述】:
我创建一个这样的数据库:
Sub Main()
Dim wrkDefault As Workspace
Dim dbE As DBEngine
Dim dbs As Database
'Get default Workspace.
dbE = New DBEngine
wrkDefault = dbE.Workspaces(0)
'Set the database filename
Dim DBFilename As String
DBFilename = "c:\mydb.mdb"
'Make sure there isn't already a file with the same name of
'the new database file.
If Dir(DBFilename) <> "" Then
MsgBox("File already exists!")
Exit Sub
End If
'Create a new encrypted database with the specified
'collating order.
'lock database with the password 'hello'
dbs = wrkDefault.CreateDatabase(DBFilename, _
LanguageConstants.dbLangGeneral & ";pwd=hello;", DatabaseTypeEnum.dbEncrypt)
dbs.Close()
End Sub
如何在 VB.NET 中使用 DAO 再次打开这个数据库?
【问题讨论】:
标签: database vb.net passwords dao encryption