Home All Groups Group Topic Archive Search About

Assign a workgroup to a workspace object - Thanks to Paul Overway

Author
7 Apr 2005 3:55 AM
Jenny
Thanks Paul Overway, your solution did and didn't help me - believe me, after
hours of reading and experimenting I would have created a new workspace with
a specific workgroup if I could fine the correct syntax  or a relevant
example somewhere!  Can you give me a sample please of linking to tables in a
backend database that has a specific workgroup from within a frontend
database that does not have it's own specific workgroup. Or if anyone else
can, I would really appreciate it!  Thanks - Jenny

Author
7 Apr 2005 5:40 AM
TC
Paul, are you sure that you *can* link to a secured db from an
unsecured one, just by creating the link from a suitable workspace?
I've never tried that myself. Are you sure that it is possible?
(without playing special PID tricks)

Cheers,
TC
Author
8 Apr 2005 9:57 PM
Paul Overway
Yes...see example

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Show quote
"TC" <aatcbbtcc***@yahoo.com> wrote in message
news:1112852430.850422.103420@o13g2000cwo.googlegroups.com...
> Paul, are you sure that you *can* link to a secured db from an
> unsecured one, just by creating the link from a suitable workspace?
> I've never tried that myself. Are you sure that it is possible?
> (without playing special PID tricks)
>
> Cheers,
> TC
>
Author
8 Apr 2005 9:49 PM
Paul Overway
I'm sorry...it has been awhile since I did something like that.  You DO need
to work in a 2nd workspace, but you also need to instantiate another
DBEngine object first.  So, you'd do something like this (air code)

Dim dbe as New DbEngine
Dim wrk as Workspace
Dim db as database

    dbe.SystemDB = "path to workgroup file here"  'you'll either have to
hard code it or prompt from the user.
    Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here",
"password here")
    dbe.Workspaces.Append wrk

    Set db = wrk.OpenDatabase(currentdb.name)

    'ok....relink tables or do whatever now


--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Show quote
"Jenny" <Je***@discussions.microsoft.com> wrote in message
news:75212A1E-84F0-4970-B23F-B3FB54300A6C@microsoft.com...
> Thanks Paul Overway, your solution did and didn't help me - believe me,
> after
> hours of reading and experimenting I would have created a new workspace
> with
> a specific workgroup if I could fine the correct syntax  or a relevant
> example somewhere!  Can you give me a sample please of linking to tables
> in a
> backend database that has a specific workgroup from within a frontend
> database that does not have it's own specific workgroup. Or if anyone else
> can, I would really appreciate it!  Thanks - Jenny
>
Author
8 Apr 2005 9:56 PM
Paul Overway
PS....just to clarify...you need to relink using the db object from below,
don't use currentdb or another db object because currentdb was opened in the
"unsecure" workspace

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Show quote
"Paul Overway" <paul@I.hate.spam.logico-solutions.com> wrote in message
news:%23SJ0RPIPFHA.3076@TK2MSFTNGP14.phx.gbl...
> I'm sorry...it has been awhile since I did something like that.  You DO
> need to work in a 2nd workspace, but you also need to instantiate another
> DBEngine object first.  So, you'd do something like this (air code)
>
> Dim dbe as New DbEngine
> Dim wrk as Workspace
> Dim db as database
>
>    dbe.SystemDB = "path to workgroup file here"  'you'll either have to
> hard code it or prompt from the user.
>    Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here",
> "password here")
>    dbe.Workspaces.Append wrk
>
>    Set db = wrk.OpenDatabase(currentdb.name)
>
>    'ok....relink tables or do whatever now
>
>
> --
> Paul Overway
> Logico Solutions
> http://www.logico-solutions.com
>
>
> "Jenny" <Je***@discussions.microsoft.com> wrote in message
> news:75212A1E-84F0-4970-B23F-B3FB54300A6C@microsoft.com...
>> Thanks Paul Overway, your solution did and didn't help me - believe me,
>> after
>> hours of reading and experimenting I would have created a new workspace
>> with
>> a specific workgroup if I could fine the correct syntax  or a relevant
>> example somewhere!  Can you give me a sample please of linking to tables
>> in a
>> backend database that has a specific workgroup from within a frontend
>> database that does not have it's own specific workgroup. Or if anyone
>> else
>> can, I would really appreciate it!  Thanks - Jenny
>>
>
>
Author
3 May 2005 1:10 AM
Paul Overway
Just to clarify some things about opening a secure database from within an
unsecure database...my air code posted earlier would never work in Access
(although it works in VB just fine).  The following code WILL work...

Dim dbe as New PrivDbEngine    'NOTE this object is not documented in
Access, but is documented elsewhere
Dim wrk as Workspace
Dim db as database

dbe.SystemDB = "path to workgroup file here"  'you'll either have to hard
code it or prompt from the user.

Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here", "password
here")

dbe.Workspaces.Append wrk

Set db = wrk.OpenDatabase(currentdb.name)
'ok....relink tables or do whatever now


If anyone is interested in documentation for PrivDBEngine see

http://www.microsoft.com/resources/documentation/sql/7/all/proddocs/en-us/msjet/jetch02.mspx

(it IS there...just way down the page!)

--
Paul Overway
Logico Solutions
http://www.logico-solutions.com


Show quote
"Paul Overway" <paul@I.hate.spam.logico-solutions.com> wrote in message
news:%234epHTIPFHA.2144@TK2MSFTNGP09.phx.gbl...
> PS....just to clarify...you need to relink using the db object from below,
> don't use currentdb or another db object because currentdb was opened in
> the "unsecure" workspace
>
> --
> Paul Overway
> Logico Solutions
> http://www.logico-solutions.com
>
>
> "Paul Overway" <paul@I.hate.spam.logico-solutions.com> wrote in message
> news:%23SJ0RPIPFHA.3076@TK2MSFTNGP14.phx.gbl...
>> I'm sorry...it has been awhile since I did something like that.  You DO
>> need to work in a 2nd workspace, but you also need to instantiate another
>> DBEngine object first.  So, you'd do something like this (air code)
>>
>> Dim dbe as New DbEngine
>> Dim wrk as Workspace
>> Dim db as database
>>
>>    dbe.SystemDB = "path to workgroup file here"  'you'll either have to
>> hard code it or prompt from the user.
>>    Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here",
>> "password here")
>>    dbe.Workspaces.Append wrk
>>
>>    Set db = wrk.OpenDatabase(currentdb.name)
>>
>>    'ok....relink tables or do whatever now
>>
>>
>> --
>> Paul Overway
>> Logico Solutions
>> http://www.logico-solutions.com
>>
>>
>> "Jenny" <Je***@discussions.microsoft.com> wrote in message
>> news:75212A1E-84F0-4970-B23F-B3FB54300A6C@microsoft.com...
>>> Thanks Paul Overway, your solution did and didn't help me - believe me,
>>> after
>>> hours of reading and experimenting I would have created a new workspace
>>> with
>>> a specific workgroup if I could fine the correct syntax  or a relevant
>>> example somewhere!  Can you give me a sample please of linking to tables
>>> in a
>>> backend database that has a specific workgroup from within a frontend
>>> database that does not have it's own specific workgroup. Or if anyone
>>> else
>>> can, I would really appreciate it!  Thanks - Jenny
>>>
>>
>>
>
>

AddThis Social Bookmark Button