Hi Michael,
I too am a Codemine developer. For the past year, I have been developing a multi-company payroll application in VFP6.0 with Codemine6.1.19. We will be moving to 7.0 but not just yet.
Sounds like you have a pretty good handle on how this multi-company stuff works.
My app is a true multi-user file server application.
All the shared data is out on the server.
o:\payroll\commondata
o:\payroll\data all the top level data is kept here
appdata.dbc, appreg01.dbc, appreg02.dbc
the client table is also here
o:\payroll\data\data0000 myclient.dbc and the empty tables for each client
o:\payroll\data\data0001 myclient.dbc
and the tables for client 1 with client 1's data
o:\payroll\data\data0002 myclient.dbc
and the tables for client 2 with client 2's data
o:\payroll\data\data0003 etc..........
I modified appapplication.getfilepath()
IF THIS.lApplicationStarted
* Strip off any path info in the original spec.
m.cFile = UPPER(SUBSTR(m.cFile, RAT('\', m.cFile) + 1))
***********************
* Get the path to the database container, myclient.dbc, for the current client.
if m.cFile = 'MYCLIENT.DBC'
m.cPath = ''
m.cPath = trim(goapp.cpathmyclient)
return lower(m.cPath + m.cFile)
endif
************************
goapp.cpathmyclient is a custom property.
It gets loaded in the init event of client.scx
goapp.cpathmyclient = client.path
Client.scx is basically a client list in a grid that gets launched immediately after logging in to the application. Every time the user moves from one client record to the next in the grid, the afternav method for the client table gets fired in the datamanager and I update goapp.cpathmyclient with client.path.
********************************
* client.scx thisform.cmdatamanager.afternav()
LPARAMETERS cworkarea
do case
case m.cworkarea == 'Client'
* Save the path to the database container, myclient.dbc, for the current client.
goapp.cpathmyclient = client.path
endcase
**********************************
In the top level client table, each client has one record.
Client.path contains the path to each client's database container.
Once the user does select a client from the grid, there's an open this account button.
The client account form launches and now the user is looking at all this particular client's information in the accoutn form. It's a big form.
Each user can have an unlimited number of accounts open at the same time.
But each account can only be open by one user at a time. This was a requirement from my client.
Anyway, this structure seems to be ok so far. There's still a lot of testing we need to do.
Deb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement