Access transactions question

  • Thread starter Savvoulidis Iordanis
  • Start date
S

Savvoulidis Iordanis

I use Acc2000, but the question is general

I have a MDE file with the application, connected to the MDB data file.
When I want to start a transaction in my application, I write:

Dim wks As DAO.Workspace

Set wks = DBEngine.Workspaces(0)

wks.BeginTrans

... stuff ...

wks.CommitTrans or wks.Rollback

The question is :
Is the transaction opened in the MDE file or in the MDB file?

I came up with this question because I noticed an increase in the size of
the MDE file which does not have the data in order to be increased
but the application only. I think it should remain the same as the 1st MDE
creation.

If the code is wrong, how should I write it?

TIA
 
D

Douglas J. Steele

My understanding is that Access does its "temporary" work in the front-end,
therefore it can increase the size of the front-end.

What you've coded is the only way to do it.
 
S

Savvoulidis Iordanis

Thanks for the response Douglas.
But then the size of the MDE will grow forever and finally run slowly.
If I set the Compact on close attribute, sometimes
the compacting fails, and leaves a db1,2,... files on disk
Is this a problem in the MDE itself?

On the other hand, if i leave this attribute unchecked,
and allow the user to compact manually from the menu,
while running the app, no db1,2,... files are created by error

I use Acc2000 with the latest patches (office and dac)
Which of the two ways should I stay on?
 
D

Douglas J. Steele

I wouldn't recommend using Compact On Close: there are too many reports of
problems with it.

Another alternative to the 2 you listed is simply to replace the user's MDE
file on a regular basis.
 
S

Savvoulidis Iordanis

Thanks again Douglas.

Now that I see you're online, would you mind take a look at my other
question
Thread: "Recursion problem for all"? The reason I haven't supplied any code
is that nothing worked for me so far...

Thanks anyway
 
Top