|
#1
|
||||
|
||||
|
I feel like such a dork (so what's new, eh?). I'm just fine opening an Access database with ADO using the "Jet OLEDB
atabase Password=aardvark" kind of thing. All well and good for a database I protect using Access itself. I am at a loss as to how to change/remove the password programatically from within VB6. With DAO it was a piece of cake. I've tried all my usual sources on line, but to no avail. I know it's gonna be so simple I'm going to kick myself...Thanks, all.
__________________
Gary Brown Examiner Corporation "How do you know They know what they know?" Company:The Examiner Glass:FusedLight Politics:ObamaUSA |
|
#2
|
||||
|
||||
|
I just knew it.... as soon as I posted the note I found the solution. As guessed, pretty simple:
-------------------------------------------- Dim strSourceDB As String Dim strDestDB As String Dim JetEngine As JRO.JetEngine Dim strSourceConnect As String Dim strDestConnect As String ' Build connection strings for SourceConnection and ' DestConnection arguments. strSourceDB = "original.mdb" strSourceConnect = "Data Source=" & strSourceDB & ";Jet OLDEDB atabase Password=OldPassword"strDestDB = "newdb.mdb" strDestConnect = "Data Source=" & strDestDB & ";" & _ "Jet OLEDB:Encrypt Database=True;" & _ "Jet OLEDB atabase Password=NewPassword"Set JetEngine = New JRO.JetEngine ' Compact and encrypt the database specified by strSourceDB ' to the name and path specified by strDestDB. JetEngine.CompactDatabase strSourceConnect, strDestConnect Set JetEngine = Nothing --------------------------- *sigh*
__________________
Gary Brown Examiner Corporation "How do you know They know what they know?" Company:The Examiner Glass:FusedLight Politics:ObamaUSA |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Password protect a setup? | me0007 | Setup Factory 6.0 | 1 | 06-29-2004 04:59 PM |
| Adding Password Protection | Desmond | AutoPlay Media Studio 5.0 Examples | 0 | 10-03-2003 04:25 PM |
| Reoccurring password | Bruce | AutoPlay Media Studio 4.0 | 6 | 06-04-2003 05:09 PM |
| Password | Bruce | AutoPlay Media Studio 4.0 | 2 | 05-31-2003 06:52 PM |
| HOWTO: Add Password Protection to Your Application | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-03-2002 04:39 PM |
All times are GMT -6. The time now is 06:12 AM.







atabase Password=aardvark" kind of thing. All well and good for a database I protect using Access itself. I am at a loss as to how to change/remove the password programatically from within VB6. With DAO it was a piece of cake. I've tried all my usual sources on line, but to no avail. I know it's gonna be so simple I'm going to kick myself...
Linear Mode

