DBEngine & SystemDB property 
Author Message
 DBEngine & SystemDB property

Can anyone tell me if it is possible for the
DBEngine.SystemDB property to be changed without closing a
workspace that has been created via the DAO code?

I have two different workgroup files I need to reference
in order to communicate with two different databases but I
keep getting an error the I do not have a valid user
name.   When I look at the DBEngine.SystemDB property via
the watch window my DBEngine.SystemDB statement does not
seem to be executed.    

I am using AutoCAD 2002 as my controller and talking to
two different databases that require two different
workgroup file as mentioned above.

If anyone has any tips regarding my problem I would
appreciated any help.

Regards,
Tony Nichols



Mon, 14 Nov 2005 02:44:30 GMT  
 DBEngine & SystemDB property

Quote:
>-----Original Message-----
>Can anyone tell me if it is possible for the
>DBEngine.SystemDB property to be changed without closing
a
>workspace that has been created via the DAO code?

>I have two different workgroup files I need to reference
>in order to communicate with two different databases but
I
>keep getting an error the I do not have a valid user
>name.   When I look at the DBEngine.SystemDB property via
>the watch window my DBEngine.SystemDB statement does not
>seem to be executed.    

>I am using AutoCAD 2002 as my controller and talking to
>two different databases that require two different
>workgroup file as mentioned above.

>If anyone has any tips regarding my problem I would
>appreciated any help.

>Regards,
>Tony Nichols
>.

Tony,

A little checking into the Access help generated this:

For this option to have any effect, you must set the
SystemDB property before your application initializes the
DBEngine object (that is, before creating an instance of
any other DAO object). The scope of this setting is
limited to your application and can't be changed without
restarting your application.

So the answer to your question is no... (Or at least, not
very likely)

HTH,

Jason



Mon, 14 Nov 2005 04:09:24 GMT  
 DBEngine & SystemDB property
Jason,

Thanks for the heads up on the help information.  I looked
to the help file and realized I scanned right over the top
of the information.  

I have been "playing" with my open and close procedures
and it seems I can change the workgroup file that systemDB
looks at as long as I properly close all recordsets,
databases, and workspaces.  

The problem is now I do not have graceful exits from all
points within my program to properly close all DAO
objects.  

Again thanks!
Tony

Quote:
>-----Original Message-----

>>-----Original Message-----
>>Can anyone tell me if it is possible for the
>>DBEngine.SystemDB property to be changed without closing
>a
>>workspace that has been created via the DAO code?

>>I have two different workgroup files I need to reference
>>in order to communicate with two different databases but
>I
>>keep getting an error the I do not have a valid user
>>name.   When I look at the DBEngine.SystemDB property
via
>>the watch window my DBEngine.SystemDB statement does not
>>seem to be executed.    

>>I am using AutoCAD 2002 as my controller and talking to
>>two different databases that require two different
>>workgroup file as mentioned above.

>>If anyone has any tips regarding my problem I would
>>appreciated any help.

>>Regards,
>>Tony Nichols
>>.

>Tony,

>A little checking into the Access help generated this:

>For this option to have any effect, you must set the
>SystemDB property before your application initializes the
>DBEngine object (that is, before creating an instance of
>any other DAO object). The scope of this setting is
>limited to your application and can't be changed without
>restarting your application.

>So the answer to your question is no... (Or at least, not
>very likely)

>HTH,

>Jason
>.



Mon, 14 Nov 2005 05:25:10 GMT  
 DBEngine & SystemDB property
You can get ONE more SystemDB by creating
a PrivDBEngine object:

Dim dbe As dao.DBEngine
Set dbe = New dao.PrivDBEngine

(david)


Quote:
> Can anyone tell me if it is possible for the
> DBEngine.SystemDB property to be changed without closing a
> workspace that has been created via the DAO code?

> I have two different workgroup files I need to reference
> in order to communicate with two different databases but I
> keep getting an error the I do not have a valid user
> name.   When I look at the DBEngine.SystemDB property via
> the watch window my DBEngine.SystemDB statement does not
> seem to be executed.

> I am using AutoCAD 2002 as my controller and talking to
> two different databases that require two different
> workgroup file as mentioned above.

> If anyone has any tips regarding my problem I would
> appreciated any help.

> Regards,
> Tony Nichols



Mon, 14 Nov 2005 06:54:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. SystemDB property of DBEngine through DAO

2. Resetting the DBEngine.SystemDB after creating an Access application object

3. DBEngine.SystemDB can't be assigned

4. DAO#4 DBEngine.SystemDB - can you refresh it?

5. DAO #4 DBEngine.SystemDB (Revisited)

6. Systemdb property

7. Q: DBEngine - vs- Workspace & transactions

8. DBEngine.CompactDatabase & Access2000

9. DBEngine & CompactDataBase

10. System Registry & DBEngine

11. DBEngine.SystemDB is set to 'system.mdb'

12. "text" property read-only

 

 
Powered by phpBB® Forum Software