Re: Unexpected problem with synchronisation
- From: "Dave G @ K2" <DaveGriffiths70@xxxxxxxxx>
- Date: 15 Jun 2006 00:36:51 -0700
David
Firstly, thanks very much for your help. It is much appreciated. But
now I have a couple more questions - hope you don't mind.
1. I know how to use the where clause for a bound form, but how do I
for an unbound one - like here. And I don't understand the bit about
constantly updating. Surely in the case of an unbound form you find the
record you require, fill the form with data from that record, and
that's it until it's time to close the form, when you either save the
changes or throw them away. Or am I missing something that I should
know about.
2. Does synchronisation work down to the field level? In other words,
if the synch process sees that a record has changed, does it only
'deal' with the fields that have changed within that record, and leave
the rest alone?
Dave
David W. Fenton wrote:
"Dave G @ K2" <DaveGriffiths70@xxxxxxxxx> wrote in
news:1150313564.166992.315250@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Would you mind telling me in a little more detail about how you do
this. I have a function called ShowRecord(ID) which uses FindFirst
to fill a recordset with the required record, . . .
Why use a FindFirst? Why not use a WHERE clause that returns the
single record you want? If you use a FindFirst, you have to
constantly update the recordset to be sure you're getting the most
current data.
. . . which is then used to fill
the form. I have another function called SaveRecord(ID) which more
or less does the opposite. How and where do you create and save a
snapshot, and then how do you compare them at save time - sorry, I
just can't see how to do this even though I like the idea.
When you load a record, you open a recordset of Snapshot type with
the data for the one record you want. You then leave that open in
memory. When you save, you open a new dynaset recordset filtered to
the single record, and loop through its fields. You compare the data
in the controls on the forms to the data in the corresponding fields
in the snapshot. If it's changed, you then check it against the data
in the dynaset (which should be current values). If it's the same as
the snapshot, you're safe to change it. If it's different from the
snapshot, you may or may not choose to tell the user that the data
changed since they started editing it.
There are a number of UI issues with latter, but I in some
circumstances it's preferable to overwriting the changes silently.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.
- Follow-Ups:
- Re: Unexpected problem with synchronisation
- From: David W. Fenton
- Re: Unexpected problem with synchronisation
- References:
- Re: Unexpected problem with synchronisation
- From: Dave G @ K2
- Re: Unexpected problem with synchronisation
- From: David W. Fenton
- Re: Unexpected problem with synchronisation
- Prev by Date: Create list of dependencies and dependants
- Next by Date: Re: Permissions for one form changed
- Previous by thread: Re: Unexpected problem with synchronisation
- Next by thread: Re: Unexpected problem with synchronisation
- Index(es):
Relevant Pages
|