Access 97 - CopyObject and TransferDatabase

  • Thread starter Thread starter =?iso-8859-1?Q?H=E9jja_K=E1roly?=
  • Start date Start date
?

=?iso-8859-1?Q?H=E9jja_K=E1roly?=

I'm using Access 97. I need to send periodically
patching mdb-s to my clients. I transport objects (forms,
reports etc.) in an .mdb that (when opened) should
replace the old objects in (or copy new objects to) the
clients' databases. I tried to uses the DoCmd.CopyObject
and DoCmd.TransferDatabase methods to perform the
replacements, but both methods do generate error when the
transported object exists in the destination database
too, then Access shuts down.
I tried then to delete first through automation
existing objects that should be replaced in the
destination databases by creating a new instance of
Access, opening the desired database with the
OpenCurrentDatabase method, then using the
DoCmd.DeleteObject method. The problem there is that
my "autoexec" macro in the destination database begins to
run, when I open that database programmatically. The
method described in the Microsoft Knowledge Base (article
nr. 147816) - with use of the SendKeys "+" statement to
simulate holding down the SHIFT key while opening the
database - is not functioning by me.
Has anyone any idea, how can I resolve these problems?
Thanks for any response.

Karcsi
 
For this I would need to modify the applications at
many different locations for the applications to be able
to run the patch sent and test if every operation is
successfully executed. Anyway, thanks for the idea, I
will try it if I won't have other choice.

Karcsi
 
-----Original Message-----
Hi Karcsi,

In this situation it's probably a good idea to split the database so
that the front end is in one .mdb, with the tables in a
separate .mdb.

The front ends and the back ends are already separated,
I need to patch just the front ends.
That way, most updating and patching can be accomplished simply by
distributing a new version of the front end.

The problem lies here in the sizes of the front ends.
At this time I have no other possibility to send patches
than on floppies. (The clients are distributed in many
different locations.)
In-situ modification of the back end will only be required on the
hopefully rare occasions when it is necessary to change the data
structure. See
http://www.granite.ab.ca/access/backendupdate.htm for
suggestions on how to do this.

I fortunately haven't need so far to change data
structures. I already have written a patch that
theoretically updates all kind of objects in the
destination databases (including data structure updates).
The problem with that patch was that in most cases it
wasn't enough to run the patch one single time, but many
times to complete all his tasks. For example, if I want
to make 10 operations (exporting with the
TransferDatabase method) with the patch, at the first run
probably in will perform the 1st, 2nd, 4th, 6th, 8th, and
10th operation, the rest of them fails. At the second run
will perform the 3rd, and 7th. At the third run the 5th,
and in the fouth the 9th. I wanted to make a betterment
of this patch, but I found no working solution so far if
I want him to perform all his tasks at the first run.
Somebody has recently recommended for me to use a
reference to the destination database. I even want to try
this.

Karcsi
I'm using Access 97. I need to send periodically
patching mdb-s to my clients. I transport objects (forms,
reports etc.) in an .mdb that (when opened) should
replace the old objects in (or copy new objects to) the
clients' databases. I tried to uses the DoCmd.CopyObject
and DoCmd.TransferDatabase methods to perform the
replacements, but both methods do generate error when the
transported object exists in the destination database
too, then Access shuts down.
I tried then to delete first through automation
existing objects that should be replaced in the
destination databases by creating a new instance of
Access, opening the desired database with the
OpenCurrentDatabase method, then using the
DoCmd.DeleteObject method. The problem there is that
my "autoexec" macro in the destination database begins to
run, when I open that database programmatically. The
method described in the Microsoft Knowledge Base (article
nr. 147816) - with use of the SendKeys "+" statement to
simulate holding down the SHIFT key while opening the
database - is not functioning by me.
Has anyone any idea, how can I resolve these problems?
Thanks for any response.

Karcsi

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Back
Top