473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to create and reference a Workspace?

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
1 8997
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: deko | last post by:
I need to get the Form properties of an mdb I've opened as a Workspace. How do I access the Forms collection? I'm not sure how to navigate the object model here... or if that is even my...
0
by: Ryan | last post by:
Hello, HELP! I have TWO questions: First, I am trying to execute a SQL pass-through query in Access VBA. According to MSAccess help, I should be able to use the following syntax after...
3
by: Sebastien Tardif | last post by:
After I open a workspace I have access to all C++ files of the workspace. I can put breakpoints. Everything look great... So I go attach to my process and Visual C++ go close my workspace! I...
7
by: supachamp | last post by:
Hi everybody, I am having great problems with the following classes. I just can't figure out why I keep getting the error message: Building file: ../edge.cc Invoking: GCC C++ Compiler g++...
0
by: MikeB | last post by:
Problem : I am maintaining a legacy application which is distributed with a default database, loaded from a file called Master.dat. I wish to update the values of 10 fields in 1 table. I...
5
by: ljlevend2 | last post by:
Is there any way to create a local server during runtime? For example, if you add an existing Web Site to a Solution from within Visual Studio (by right clicking the solution in the Solution...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
0
by: Greg Corradini | last post by:
Hello, Lately I've been using the mx.ODBC module to query Access (mdb) tables. For the life of me, I can't get the 'create table' sql command to work. I use this command in Oracle and I've seen...
3
by: DeanL | last post by:
Hi guys, Does anyone know of a way to create multiple tables using information stored in one table? I have a table with 4 columns (TableName, ColumnName, DataType, DataSize) and wanted to know...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.