
Specifiying a Workgroup File When Using ADO to Open an Access .mdb file (OLEDB)
Well, I looked at Carl's page, but based on his examples it looks like you
can't specify a workgroup file or database password using the ADO
nterface -- I think. (Hence the cross post; I don't know if this is doable
in ADO or if I should be using odbc.)
One of the links on Carl's page lead me to:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado2...
mdrefjetprovspec.asp
which has the following reference (abbreviated):
Provider-Specific Connection Parameters
The OLE DB Provider for Microsoft Jet supports several provider-specific
dynamic properties in addition to those defined by ADO. As with all other
Connection parameters, they can be set via the Connection object's
Properties collection or as part of the connection string.
The following table lists these properties with the corresponding OLE DB
property name in parentheses.
Jet OLEDB:Database Password
(DBPROP_JETOLEDB_DATABASEPASSWORD)
Indicates the database password.
Jet OLEDB:System Database
(DBPROP_JETOLEDB_SYSDBPATH)
Indicates the path and file name for the workgroup information file
(system database).
This implies to me that I should be able to add "Database Password =" to the
ConnectionString like so:
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data
Source=n:\Board\Board.mdb;Database Password=xyZ"
(The database is simply password protected.)
However, when I made the change I got the following error:
Runtime Error "-2147467259 (80004005)":
Could not find installable ISAM.
When I clicked 'Help' I got information on "Form Window".
Summarizing:
1) Is it possible to open a password protected database using ADO?
2) If so how?
3) If not, what is considered the common approach for doing this.
Thanks!!
Don
Quote:
> Please take a look at Carl Prothman's (MVP) FAQ
> http://www.able-consulting.com/ADO_Conn.htm
> Please don't crosspost.
> Regards,
> Eric Garza, MVP
> > I am trying to "secure" an .mdb file that is being accessed by several
> users
> > from a VB client using ADO access. The .mdb file is on a network drive.
> > The best I can gather from the documentation, if the userID and password
> are
> > provided, ADO tries to use the default workgroup file on the local
> machine.
> > db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data
> > Source=n:\Board\Board.mdb;UserID=RemoteAccess;Password=xyZ"
> > Am I way off base here? How can I password protect the .mdb file (more
to
> > keep people from meddling with it than data security reasons) so that
the
> VB
> > clients on the local machines can open the file? Basically, I want to
> > prevent a casual user from using Access to open the .mdb file on the
> network
> > drive.
> > Any pointers to references or ideas for a solution will be greatly
> > appreciated!!!
> > Thanks!!
> > Don