Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple client/server imitation
Message
From
04/03/2004 18:39:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00883135
Message ID:
00883315
Views:
8
>Hi All,
>I wantto make a simple Client/Server imitation like eg.
>
>exe file(s) will copy to the clients
>data files (dbc,dbf ...) will copy to the appointed server pc
>
>i've copied both of app paths to the c:\ and d:\driver and before start.prg i am detecting the default path but i couldn't success my goal.
>
>my start_prep.prg code is like below
>
>If ! Used("pathcont")
>	Use pathcont In 0 Shared Again
>	If Empty(pathcont.datadir)
>		Messagebox("Work Dir Not Selected You Cannto Continiue Without Selection",16,"Data Path Error")
>		Do Form Form\SelectPath
>	Else
>		Select pathcont
>Set PATH to (pathcont.datadir)
>		Do Start
>	Endif
>Endif
>
>
>it works but my app still uses exe path data's
>
>PS: all of tables are using with DataEnvironment

And the DE has the relative path to the tables hardcoded in it. To set it to use your tables/databases, you'd need to go through each cursor object in the DE (autoopentables must be .f.), and set the properties (database and table - don't remember the exact PEM names now) to your new values, and then cursor.opentable(). The best way to do this is to have a class which will be addobject()ed to the form during its .load() method, find thisform.DataEnvironment, and do whatever it takes on each cursor, during its own .init - and then it's done its job, it can just return .f. and vanish.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform