Re: Question about potential for corruption when doing direct sync over a WAN

Tech-Archive recommends: Fix windows errors by optimizing your registry



user@xxxxxxxxxxxxxx wrote in
news:eQuDT1KKIHA.3916@xxxxxxxxxxxxxxxxxxxx:

David W. Fenton wrote:
Do you have memo fields stored in your replicated tables? Are the
users allowed to synch while they have forms open?

Yes I have memo fields.

The users are NOT supposed to synch while any form is open.

Well, you can prohibit that by having your synchronization routine
check the Forms collection to see how many forms are open. You could
do one of two things:

1. loop through the open forms and close any of them that should not
be open (you'd leave the synchronization dialog, if you've got one,
and your main switchboard form), OR

2. check each form to see if it's dirty and save it if it is. That
would prohibit any replication errors.

But if they got creative they could. I have a sync button on the
main menu. All submenus and forms are accessed in a hierarchical
path. They are supposed to follow the hierarchy back to the main
menu. but they could look at the list of open forms at the bottom
of their screen and select the Main Menu and then use the sync
button while a form was open.

Your synch code should prevent the user from doing things that are
potentially bad for your data. During a synch, your code should
either close the other open forms, or save their data.

I saw another user's code that used a form setting for force the
current form to retain focus until it was closed.

Eh? You mean a modal form? All you have to do is open it with the
acDialog argument to DoCmd.OpenForm and no other form can get the
focus until the form is closed or hidden.

I may pursue this.

I'm surprised you're not using it all over your app. All Access
forms that function as dialog boxes should be modal.

I think I will also remove the sync button from the form (I added
it in response to client project manager who like her staff was
peranoid about losing data).

From what form?

Any good way to trap un-graceful shutdown of Access (e.g. the red
"x" )and stop such?

Well, no, not really, as it can always be shut down from Task
Manager. But you can do things like saving all open forms before the
app quits. You can also prevent the user from quitting without going
through the QUIT command on your main menu. Or you can use a hidden
form that does all this in its OnClose event.

I would sure like to know from any MVP who might have access to
some of the Microsoft restricted newsgroup items and/or access
to some of the Microsoft Access team, if you can get corruption
at the replica initiating the sync in the case of a failed sync
due to connectivity.

Chances are, nobody who is a current MVP knows these things, as
nobody does Jet Replication any longer.

Oh well, I am an old fa** so I don't mind using old techniques.

The "old" techniques have long been documented. See my Jet
Replication Wiki for pointers:

http://dfenton.com/DFA/Replication/

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.


Quantcast