|
-
Nov 10th, 2000, 04:19 PM
#1
Thread Starter
Lively Member
I have a password protected MDB. Which properties I have to set up, and how, in an ADO Connection to access it?
Thanks in advance.
-
Nov 10th, 2000, 04:54 PM
#2
Lively Member
Sorry......
Hi,
Iam just going thru some books on that topic for my necessity and i read books saying that
"Unfortunately there is no way to set,change,or clear a database password by using ADO code.But you can do the same with DAO"
-
Nov 10th, 2000, 05:31 PM
#3
maybe this will help a bit, note the nice little problem with in the .Properties string:
Code:
Private Sub Form_Load()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "Test", GetConn(App.Path & "\test.mdb", "test"), adOpenStatic, adLockOptimistic
Set Grid.DataSource = rs
Set rs = Nothing
End Sub
Private Function GetConn(ByRef Path As String, _
ByRef Pwd As String) As ADODB.Connection
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.3.51"
.Properties("Jet OLEDB:Database Password") = Pwd
.Open Path
End With
Set GetConn = cn
Set cn = Nothing
End Function
[Edited by Sascha on 11-10-2000 at 05:33 PM]
-
Nov 10th, 2000, 06:16 PM
#4
Monday Morning Lunatic
Check the "Disable smilies in this post" box when posting a message.
JMuller - I hate to say it, but Access DBs have probably the worst security in the world .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|