PC Review


Reply
Thread Tools Rate Thread

Can you supply ACCDB's password in OpenDatabase method?

 
 
Montgomery-Tim
Guest
Posts: n/a
 
      22nd Feb 2010
Can you supply the password in Visual Basic code for an ACCDB file that you
wish to open using the OpenDatabase method?
 
Reply With Quote
 
 
 
 
Daniel Pineault
Guest
Posts: n/a
 
      22nd Feb 2010
The following is pulled from the Access help file


Syntax

Set database = workspace.OpenDatabase (dbname, options, read-only, connect)

....

The connect argument is expressed in two parts: the database type, followed
by a semicolon ( and the optional arguments. You must first provide the
database type, such as "ODBC;" or "FoxPro 2.5;". The optional arguments
follow in no particular order, separated by semicolons. One of the parameters
may be the password (if one is assigned). For example:

"FoxPro 2.5; pwd=mypassword"

So the answer to your question is YES, simply add it as part of your connect
argument
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Montgomery-Tim" wrote:

> Can you supply the password in Visual Basic code for an ACCDB file that you
> wish to open using the OpenDatabase method?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dbengine.OpenDatabase fails on accdb files =?Utf-8?B?Y2xhdG9u?= Microsoft Access VBA Modules 1 6th Jun 2007 11:32 AM
dbengine.OpenDatabase fails on accdb files =?Utf-8?B?Y2xhdG9u?= Microsoft Access VBA Modules 0 5th Jun 2007 10:08 PM
OpenDatabase Method Jim Pockmire Microsoft Access VBA Modules 2 9th Oct 2004 02:43 PM
OpenDatabase method with password Yanto Microsoft Access Form Coding 2 13th Sep 2003 01:39 PM
OpenDatabase Method Crystal Microsoft Access VBA Modules 2 25th Aug 2003 06:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:33 AM.