Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network
Message
From
12/09/2000 06:50:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00415274
Message ID:
00415317
Views:
17
>Hi!
> I'm want to ask you some questions about networks in FoxPro. I'm making a project wright and I tried to use it on a 8 computer network with a 10/100 HUB. Well everything is fine but I don't know wrilly much about network programin. Can you send me some samples or some documentation about this?!?
> I not a begginer in VFP so you can talk easy with me no need to exlain every term.
> Thank you in advance.
>
>
>PS Can you send me the samples and the doc to joeb@easynet.ro? Or at least notify me please that you put the samples on Universal Thread because I don't have much time to check it.


Programming for multiuser access is a long topic that's nearly impossible here to cover with all aspects. I could just say :
set multilocks on
set exclusive off
per every datasession.

use private datasessions
use buffering

and you're done. It's that easy and unfortunately it's not that easy. There are commands that absolutely require exclusive access to the table(s) and there are commands that are being argued to be handed to enduser (ie: pack, zap).
There are plenty of commands that should be used with care in a shared environment and unlike single use data doesn't get updated at all times and should be checked (cause of failure for update, action to take etc). All these are covered in a dedicated chapter in online help (Chapter 17:Programming for shared access). There you'd find of many commands act on different locking schemes (table and record basically). Also under 'set datassession' you'd find a collection of all set commands that are scoped to current datasession.
I suggest you design all of your apps as if they were multiuser (and if possible client-server). Because a multiuser app could be used by a sigle computer too (you don't hav to maintain 2 different versions). This is my way but I think nearly everyone do it that way.
Well to get you up quickly and provide a sample app you could :

Create a test table(s)
Create a form with form wizard
In DE.beforeopentables or form.load
set multilocks on
set exclusive off
For every table in DE set buffermodeoverride to 2-5 (could be controlled at form level though but my preference is to set per cursor). Test all modes to grasp differences. Further you'd realize automatic locking doesn't cover all your needs (and sometimes think docs lie:) As I remember there were transaction handling portions in the code too.
Create the app and run from at least 2 different VFP sessions to mimic at least 2 stations usage (IOW you could simulate multiuser access on a single computer)
You can check the code of wizstyle.vcx txtbtns class for code handling multiuser (there also local-remote views, parent-child tables data handling code is available). Few (or many?) uses wizard code but at least it's a starting point IMHO. Even you might like it and use to create all your multiuser apps.
Good luck.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform