Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to close \DATA\AppData ?
Message
From
04/11/2004 07:23:03
 
 
To
04/11/2004 04:05:33
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00957045
Message ID:
00958025
Views:
26
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()	&& Get name/path of current DBC.
CLOSE DATABASES			&& Close the current database.

*** At this point, there is no database open.

OPEN DATABASE (m.cDatabase)	&& Open the original DBC.
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform