Connect a secure back-end from a non-secure front-end

R

Ronald

How can I connect a secure back-end database from a non-secure front-end
database? I just cannot find the answer in the knowledge base.
Thanks in advance.
 
A

Alex Dybenko

You have to add password to connection:

tdf.Connect = ";DATABASE=mydb.mdb;PWD=mypassword"
 
S

Stefan Kowalski

Ronald said:
How can I connect a secure back-end database from a non-secure front-end
database? I just cannot find the answer in the knowledge base.
Thanks in advance.


If the front end is not secured, then it does not matter which workgroup you
belong ot when you open it. So you might as well open it with the workgroup
which was made for the backend. You could use a shortcut like:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"C:\MyFolder\MyFrontEnd.mdb" /WRKGRP "C:\AnotherFolder\MyWorkgroup.mdw"

Once you have started Access and logged on, you can create links to the
backend without having to supply any further information.
 
R

Ronald

Hi Alex.

This piece of code works but only as long as you are in side of the function
after the Set dbProtected. I need code that keeps the secure database open
until the front-end is closed.

Public Function Connect()

Dim wrk As Workspace
Dim dbProtected As Database

Set wrk = DBEngine.Workspaces(0)
Set dbProtected = [wrk].OpenDatabase("C:\Database\Secure.mdb", False,
False, ";PWD=password")

End Function

Greetings,

Ronald.
 
Top