Hi Gojko,
>1) Aside from main problem,is it possble ( and where and how ? ), after main menu is
> displayed, to close and reopen \DATA\Appdata, anyhow ?
You can try code like the following in appApplication::ShowMenu method (appmain.vcx) :-
IF NOT DODEFAULT()
RETURN .F.
ENDIF
m.cDataBase = DBC()
CLOSE DATABASES
OPEN DATABASE (m.cDatabase)
>3) In your approach what is obvious to you is not for me; here are only few Q.:
>
> a) after user, ie., insert new copmpany, new subdir is created
> - till now I just copied files from \Data in it
> must I in new scenario use CREATE DATABASE ... , and COPY all tables from old DBC
> with COPY .... WITH PRODUCTION
How you tackle this in an application scenario is not really an issue at this stage. Eitherway, you just need to create a company specific folder under \data, and ensure that the appropriate folder specific dbc is available ie., AppdataD01, and that the necessary tables in the folder with the database. There are numeous ways to do this and I will leave that aspect to you.
> b) should be new DBC's part of project or not ?
I would put them in the project but as you are unlikely to know about them ahead of time (in the live scenario), its not really necessary as long as the application can find the various DBCs at runtime.
> c) what about hardcoded Appdata.dbc for cmainDBC property ?
That can stay the same.
> - do I need to refresh csharedregistry and cpathshared properties ?
The shared registry property can be ignored at this stage; obviously you need to ensure that path information is updated to point to the additional data folders.
The main thing I would do is manually create a dbc tables in a subfolder of \data with the dbc appropriately name ie., \data\D01 containing AppDataD01.dbc. Then just try it out and see whether or not it works for you.
HTH
-=Gary