Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to close \DATA\AppData ?
Message
From
02/11/2004 17:43:57
 
 
To
02/11/2004 16:27:38
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00957045
Message ID:
00957381
Views:
25
I have a similiar situation.
I have a multi company application where the companies are all individual
separate entities.
My thought was that I would create folders, not necessarily under the Data folder for each company. Each folder would contain a copy of the .DBC (in this case BCS.DBC).
Then in the app.beforereadevents after the security signon, I would bring up a form to select the company that would be worked on. This would set some application level custom properties. Then in the app.getfilepath I have the following:
IF !ISNULL(this.cfirmdatalocation) AND m.cFile == 'data\bcs.dbc'
	m.cFile = ALLTRIM(This.cfirmdatalocation) + 'bcs.dbc'
ENDIF 

RETURN DODEFAULT(cFile) 
So that only when the application opens the BCS.DBC which is the company DBC it is redirected to the correct location. I haven't tested this though, and was wondering if it was a legitimate approach. Also like you, I'm thinking now how do I switch between companies?

Mike
>No, no !
>
>I got some hints from Dave L. , but that was not enough. The problem is
>how to open right AppReg01 where are proper counters.
>
>In fact main DBC only serves to copy all tables in subdirectories bellow
>root \DATA; in \DATA\D01,..., \DATA\D05, etc. Setting new path and opening a
>new AppData.dbc requires to CLOSE DATABASES but then it is problem with
>AppReg01 which reopens imediately and allways from \DATA not from \DATA\D01 ie.
>
>Tried with oRegistry.CloseAll(), and then CLOSE DATABASE, but when I start
>form to update tables prior to do anything I have to open Appreg01 through
>form registryeditor and than it is OK; otherwise I got either error 17 - table
>number invalid or 1534 appdata.dbc is not open ...
>
>( At the start of work user has posibility to choose one datasets from subd. to
> work with ... )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform