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:
01139482
Views:
12
First an important point. Never use UNC paths with VFP. Always map the path to a drive letter. I can't tell you why but supposidly it runs faster with less errors. I would also suggest you share a folder off the host PC and not the entire drive then map a path to it.

Create a folder like C:\APPS then place the shared table(s) in it.
Then, from the other PC map a drive letter to it.
I do it from the DOS prompt with:
NET USE X: \\PROGRAMER1\APPS

USE \\Programer1\documents\Rand_Sam\table1 SHARED
Then becomes:
use X:\Rand_Sam\table1

Next note: You do not need the SHARED keyword. All tables are shared by defualt unless you have change the default settings.

When updating a table I suggest using the SQL UPDATE command. It is fast and will do a lock before the update. If you are only adding records then there is no need to do a lock before hand. See the SQL INSERT command for adding.

As for VFP being multi-user it works very well and was designed that way from the start. We have customers with 20 users banging away with table updates all day long and no problems. The .DBF tables somehow strongly resist corruption even when the power goes out with a bunch of people doing updates and the UPS battery on the server has been dead for 2 years!

Most of what I have heard is that you are ok till you get past about 25 concurrent users.

Gotta go. My son just showed up. If you need more let me know.
John.

>
>** 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
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform