Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple data directories
Message
From
26/02/1998 18:40:48
Christopher Holtz
Integral Computer Services, Inc.
Rochester, New York, United States
 
 
To
26/02/1998 09:27:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00081000
Message ID:
00081558
Views:
31
How about having a data directory filled with the data
structure needed for newly defined 'companies' and
keep them free of records. This would represent the
'replication pool'.

Anytime a new company is defined, a new data directory
gets created and the replication pool gets copied in.

- Chris

>>
>>* cNewDBC and cNewFreePath are public vars
>>* Changes database and free table paths at runtime
>>nMembers = amembers(aCursors,this,1)
>>for ix = 1 to nMembers
>>	if aCursors[ix,2] = "Object" and this.&aCursors[ix,1]..baseclass = "Cursor"
>>		if !empty(this.&aCursors[ix,1]..database)  && Cursor is not free
>>			this.&aCursors[ix,1]..database = cNewDBC
>>		else			&& Cursor is a free table
>>		    oldCursor = this.&aCursors[ix,1]..cursorsource
>>		    newCursor = cNewFreePath + ;
>>		        iif(right(cNewFreePath,1) = "\","",;
>>		        iif(empty(cNewFreePath),"","\"))+;
>>		    	substr(oldcursor,rat("\",oldCursor)+1)
>>		    this.&aCursors[ix,1]..cursorsource = newCursor	
>>		endif	
>>	endif
>>endfor
>>
>>But of course in the case of Chris, I would suggest still using only one dbc and tables of it, with one extra field "Company" added and filter set as needed.
>>Cetin
>
>Now this is where DBC is an obstacle. Having separate subdirectories is very handy sometimes, since it reduces network traffic (imagine a situation where each group of users has a directory for themselves). With free tables it's an easy thing to do - with DBCs you either have to replicate the DBC for each new directory, or replicate the tables' info in the DBC for each new subdirectory, but then you need exclusive access to the DBC.
>
>This may be an item for the WishList_ga - there should be a way for two tables of identical structures to share the same definition within a DBC, no matter the directory where they reside, or have DBC hierarchy, like class model - this table inherits the structure and behavior of some other table... Usually when I hear myself dreaming like this, I end up writing the stuff myself, but in case of DBCs I have serious doubts on possible effects of such an enterprise - as much as I've mucked around the DBCs, there are too many things to them that are not hardcoded - they are hammered and welded into VFP.
>
>Really, is there an easy workaround for this situation?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform