Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Client Database Updating
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01139153
Message ID:
01139462
Views:
10
Hi again, John, and thanks for the reply.

>I would focus on having MySQL as the master DB then updating the other VFP tables from it.
>I have to assume from what you say that all the tables, including MySQL contain
>indentical record sets.

Exactly. Right on, bro' :^).


>If that is the case then IMHO I suggest you have an update process that first updates
>MySQL then, at timed intervals, have VFP updated from MySQL. If you store the key of the
>current MySQL record each time the VFP update is done then it would be easy to have MySQL
>only send the latest records to each VFP table. The key sould be stored locally on each
>PC.
>
>You could have a seperate VFP EXE on each PC with a timer that runs the update.
>It is very important that there only be one Master Database.

Gotcha. We also envisioned this scenario. We were hoping for a quick fix, but
it looks like we're going to have to do a rewrite -- whether we want to or not! :^)

Well, how about one "central VFP" database. That is, this particular VFP app
doesn't need to be copied over to MySQL for the web. Currently, as we speak,
Sameer (other proger) is trying this:

** Test code.

SET EXCLUSIVE OFF
USE \\Programer1\documents\Rand_Sam\table1 SHARED
mfname=thisform.fname.Value
mlname=thisform.lname.Value
INSERT INTO table1(fname,lname) VALUES(mfname,mlname)

** End Test Code

Now we just add the timer code you spoke of above. "\\Programmer" is a shared table
on my computer. Sameer and I run this code on our machines, and we can both update the
table simultaneously without error. We even tried a "one, two, three, GO!" to see if
we'd have a collision and locking condition, but everything seemed to work out okay.
Something tells us, however, that we're probably getting lucky. Also, adding another
user or 2 might mess up the whole shebang. After all, MS SQL Sever doesn't exist
for nothing. :^)


So, I guess what this all really boils down to is this: is VFP a true
multi-user,semaphore-based, record-locking "I'm kewl!" database, or is
it a single-user environment, with hacked on "multi-user" capability.
Read: I don't mean to insult VFP. Every program has it's place and time.
I do, however, mean to find out the true definition of VFP so we know
where we stand. :^)

Thanks again, John, and best wishes, dewd...

Randall
--
Randall Jouett
Amateur/Ham Radio: AB5NI
I eat spaghetti code out of a bit bucket while sitting at a hash table! Someone
asked me if I needed salt, and I said, "I'm not into encryption." :^)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform