Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Workspaces

Status
Not open for further replies.

TJLMO

MIS
Feb 12, 2002
15
US
I am attempting to use two workspaces to conduct different transactions on two different databases. The reason I am using two workspaces is the following: the user creates the initial workspace that they use for all of their database inserts, updates, etc. The second is created without the user's knowledge to create a table and macro using an administrative password that is hard-coded. (We don't want to allow our users this type of access.) However, when I attempt to use

Database.Execute SQLString, dbSQLPassThrough

I get the error: Operation is not supported for this type of object.

Any ideas why I would get this error? Is it because I am setting the first workspace by simply saying

Set Workspace = Workspaces(0) ?

Any ideas would be greatly appreciated. Thanks.

TJLMO
 
Given the scenario and rationale, I do not see any need for two workspaces. As long as the second ("hidden") db is only manipulated via code, the normal "User" would not ever know it was there or see any trace of it any way. The sophisticated and determined user will be able to ferret this out in almost all situations any way, so the attempt to obscure it (the hidding) is not usually sucessful. So, not to critique your code, but the concept - my advice is to just oipen the 2nd .mdb, process what ever, and close it. While you do not state the purpose of the second db, I can only surmise it is some sort of trackng tool (audit trail, or activity logging). My experience is that these are actually more effective when the general user community is aware of their existance. Operating (sort of) on hte premise that asking forgivness is better than seeking permission, I am generally quite candid in installing auit trail procedures and in discussing their purpose to management and users.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top