Discussion:
Merge databases
(too old to reply)
TonySper
2010-05-14 17:12:38 UTC
Permalink
Is there a way in VFP 8 to merge a database file so that it would only enter
into the main database the difference between them? Sync them that is. Any
pointers would help. Boy I am going to miss this group.
TonySper
Beverly Howard
2010-05-14 22:40:13 UTC
Permalink
merge <<
That's a pretty open question... can you clarify what you want to
achieve as well as the reason the users don't use a common database?

The traditional way to achieve this is by using an update field that
starts out with matching values...

then if one record is updated and the other retains the synctime value,
the other is updated...

if both records show updates, it's normally up to the user to determine
which record is valid.

Beverly Howard
Dan Freeman
2010-05-14 23:12:25 UTC
Permalink
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only enter
into the main database the difference between them? Sync them that is. Any
pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.

Do you mean table or database? They're different things.

Dan
Rush Strong
2010-05-15 03:16:13 UTC
Permalink
Post by Dan Freeman
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only
enter into the main database the difference between them? Sync them
that is. Any pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.
Do you mean table or database? They're different things.
Dan
But a table is a database file. Zap, he got you.

- Rush
TonySper
2010-05-16 00:03:00 UTC
Permalink
OK You all, (note the southern accent). The reason for it is the user has a
laptop that he copies the program from the main computer into a flash drive,
I have the program able to run on a flash drive plugged into a USB port..
Now when they are out in the field or say on a client call they enter all
the data into the database. (I mean a table no containers a DBF). They then
go back to their office and have to copy the data from the laptop into the
main database. They now do this manually. They would like a program that
they can copy the changes into the main DBF. Now that you bring up the fact
that the user may change the original database I see the problem. OK lets
look at a different scenario. Say we zap all the files on the laptop and now
anything typed into the laptop would be new. Now they go back to the main
and all I have to do in append the files and zap out the files on the flash
drive.. That should work using VFP8.
Thanks for letting me air this out. Difference between a table or a
database, have to keep remembering that. Were would you all be going when
they shut this down??
TonySper
Post by Dan Freeman
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only
enter into the main database the difference between them? Sync them that
is. Any pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.
Do you mean table or database? They're different things.
Dan
Dan Freeman
2010-05-16 00:48:19 UTC
Permalink
Yeah, if you're dealing with single-user that'll work. You may have to
monkey with primary key generation and reconciling keys generated
off-site while presumably users are still generating keys back at the
mothership. But it's workable.

As soon as you have two users going mobile, the whole story changes.

Dan
Post by TonySper
OK You all, (note the southern accent). The reason for it is the user has a
laptop that he copies the program from the main computer into a flash drive,
I have the program able to run on a flash drive plugged into a USB port.. Now
when they are out in the field or say on a client call they enter all the
data into the database. (I mean a table no containers a DBF). They then go
back to their office and have to copy the data from the laptop into the main
database. They now do this manually. They would like a program that they can
copy the changes into the main DBF. Now that you bring up the fact that the
user may change the original database I see the problem. OK lets look at a
different scenario. Say we zap all the files on the laptop and now anything
typed into the laptop would be new. Now they go back to the main and all I
have to do in append the files and zap out the files on the flash drive..
That should work using VFP8.
Thanks for letting me air this out. Difference between a table or a database,
have to keep remembering that. Were would you all be going when they shut
this down??
TonySper
Post by Dan Freeman
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only
enter into the main database the difference between them? Sync them that
is. Any pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.
Do you mean table or database? They're different things.
Dan
TonySper
2010-05-16 03:28:35 UTC
Permalink
Dan,
Yes that can create a problem. Will talk to the user and give him the
options.
Thanks
Tony
Post by Dan Freeman
Yeah, if you're dealing with single-user that'll work. You may have to
monkey with primary key generation and reconciling keys generated off-site
while presumably users are still generating keys back at the mothership.
But it's workable.
As soon as you have two users going mobile, the whole story changes.
Dan
Post by TonySper
OK You all, (note the southern accent). The reason for it is the user has
a laptop that he copies the program from the main computer into a flash
drive, I have the program able to run on a flash drive plugged into a USB
port.. Now when they are out in the field or say on a client call they
enter all the data into the database. (I mean a table no containers a
DBF). They then go back to their office and have to copy the data from
the laptop into the main database. They now do this manually. They would
like a program that they can copy the changes into the main DBF. Now that
you bring up the fact that the user may change the original database I
see the problem. OK lets look at a different scenario. Say we zap all the
files on the laptop and now anything typed into the laptop would be new.
Now they go back to the main and all I have to do in append the files and
zap out the files on the flash drive.. That should work using VFP8.
Thanks for letting me air this out. Difference between a table or a
database, have to keep remembering that. Were would you all be going when
they shut this down??
TonySper
Post by Dan Freeman
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only
enter into the main database the difference between them? Sync them
that is. Any pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.
Do you mean table or database? They're different things.
Dan
Beverly Howard
2010-05-16 19:20:17 UTC
Permalink
suggest you put two additional datetime fields into the equation...

store the datetime of the last "sync" somewhere and assure each database
contains a datetime field to record the record's last update.

assuming the sync times match and one update time is post sync _and_ the
other update time is pre sync, update the latter's record.

if both updates are post sync, and the data does not match, present the
data to the user for a "resolution" choice.

The above assumes the mobile device clock is the same as the main pc.
If mobility might cross a timezone, the update field should contain gmt
datetime.

Beverly Howard
tom knauf
2010-05-17 11:05:31 UTC
Permalink
Hello,

we handle this with Offsets on the primary keys , office1 starts with 0,
office2 starts with 100000000, ...
an int gives you enough room. And a last edited timestamp as beverly
mentioned.

Another idea
Why not let the notebook work directly on the data ?
All you need is teamviewer, rdp, vnc and a dataflatrate , for example an
UMTS stick with a flat.

HTH
Tom
Post by TonySper
OK You all, (note the southern accent). The reason for it is the user has
a laptop that he copies the program from the main computer into a flash
drive, I have the program able to run on a flash drive plugged into a USB
port.. Now when they are out in the field or say on a client call they
enter all the data into the database. (I mean a table no containers a
DBF). They then go back to their office and have to copy the data from the
laptop into the main database. They now do this manually. They would like
a program that they can copy the changes into the main DBF. Now that you
bring up the fact that the user may change the original database I see the
problem. OK lets look at a different scenario. Say we zap all the files on
the laptop and now anything typed into the laptop would be new. Now they
go back to the main and all I have to do in append the files and zap out
the files on the flash drive.. That should work using VFP8.
Thanks for letting me air this out. Difference between a table or a
database, have to keep remembering that. Were would you all be going when
they shut this down??
TonySper
Post by Dan Freeman
Post by TonySper
Is there a way in VFP 8 to merge a database file so that it would only
enter into the main database the difference between them? Sync them that
is. Any pointers would help. Boy I am going to miss this group.
TonySper
The short answer is no. There's nothing built-in.
Do you mean table or database? They're different things.
Dan
Loading...