By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,500 Members | 830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,500 IT Pros & Developers. It's quick & easy.

How to create and reference a Workspace?

P: n/a
I need to create and reference a Workspace (kinda new at this...)

Here's how it works with the current db:

Dim wrk As DAO.Workspace
Set wrk = DBEngine.Workspaces(0)
wrk.BeginTrans

This works fine, but if I want to use another database:

Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
varV = "C:\Documents and Settings\Administrator\My
Documents\Database\MyDatabase.mdb"
Set wrk = DBEngine.Workspaces(wrk.OpenDatabase(varV, True)) <<==
?????????
wrks.BeginTrans

How do I reference the Workspace in this scenario?

Thanks!!!!!!!!!!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Use this instead:

Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
varV = "C:\Documents and Settings\Administrator\My
Documents\Database\MyDatabase.mdb"
Set dbs = wrk.OpenDatabase(varV)
"deko" <dj****@hotmail.com> wrote in message
news:aQ*****************@newssvr25.news.prodigy.co m...
I need to create and reference a Workspace (kinda new at this...)

Here's how it works with the current db:

Dim wrk As DAO.Workspace
Set wrk = DBEngine.Workspaces(0)
wrk.BeginTrans

This works fine, but if I want to use another database:

Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
varV = "C:\Documents and Settings\Administrator\My
Documents\Database\MyDatabase.mdb"
Set wrk = DBEngine.Workspaces(wrk.OpenDatabase(varV, True)) <<==
?????????
wrks.BeginTrans

How do I reference the Workspace in this scenario?

Thanks!!!!!!!!!!

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.