[dba-VB] Open DB

Griffiths, Richard R.Griffiths at bury.gov.uk
Thu Feb 27 09:27:00 CST 2003


John

Well done - this is perfect

BTW what is PrivDBEngine  - can't find in object browser

Are there any implications using this method?

Thanks
Richard

> -----Original Message-----
> From:	John Skolits [SMTP:JSkolits at CorporateDataDesign.com]
> Sent:	27 February 2003 13:20
> To:	dba-vb at databaseadvisors.com
> Subject:	RE: [dba-VB] Open DB
> 
> 
> See if this works for you
> 
> '****************
> 
> Dim dbe As DAO.PrivDBEngine
> Dim wsp As DAO.Workspace
> Dim dbEXT_Database As DAO.Database
> Dim strSecurityFileName as String
> Dim strFullDatabasePath as String
> 
> strSecurityFileName="c:\Windows\Ssytem\system.mdw"
> strFullDatabasePath = "c:\Test.mdb"
> 
> Set dbe = New PrivDBEngine
> With dbe
>      .SystemDB = strSecurityFileName
>      .DefaultUser = "User"
>      .DefaultPassword = "Password"
>  End With
> 
>  Set wsp = dbe.Workspaces(0)  'systemdb is locked in now
> 
> Set dbEXT_Database = wsp.OpenDatabase(strFullDatabasePath)
> 
> 
> '**************
> 
> I didn't check all the syntax but it should be OK
> 
> 
> John Skolits
> 
> 
> -----Original Message-----
> From: dba-vb-admin at databaseadvisors.com
> [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Griffiths,
> Richard
> Sent: Thursday, February 27, 2003 8:08 AM
> To: 'AccessD at databaseadvisors.com'; 'dba-VB at databaseadvisors.com'
> Subject: [dba-VB] Open DB
> 
> 
> Hi Group
> 
> Can't seem to find the exact bit of code I need......to be able to open
> another database which has its own password and is in a different
> workgroup
> using DAO.
> 
> Can find code for this....... to open another database which has its own
> password  using DAO
> 
> Anyone been there?
> Thanks
> Richard
> 
> --------------------------------------------------------------------------
> --
> ----------------------------------------
> This e-mail, together with any files transmitted with it, is
> confidential and intended solely for the use of the individual to
> whom it is addressed. If you are not the intended recipient, or
> the person responsible for delivering to the intended recipient,
> be advised that you have received this e-mail in error and that any
> use, dissemination, forwarding, printing or copying of this e-mail
> is strictly prohibited without liability on our part.
> 
> If you have received this e-mail in error please notify the sender.
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
--------------------------------------------------------------------------------------------------------------------
This e-mail, together with any files transmitted with it, is
confidential and intended solely for the use of the individual to
whom it is addressed. If you are not the intended recipient, or
the person responsible for delivering to the intended recipient,
be advised that you have received this e-mail in error and that any
use, dissemination, forwarding, printing or copying of this e-mail
is strictly prohibited without liability on our part.

If you have received this e-mail in error please notify the sender.



More information about the dba-VB mailing list