main logo
Subject: Re: Clarifications: DBPaths.DBF to distribute or not (also required or not)
Author: Bhavbhuti Nathwani
Posted: 2002/11/27 23:35:18
 
View Entire Thread
New Search


Thank you Miguel for responding. I hadn't got around to know the answer. Your answer has corrected one doubt that I had, to use the registry. Now I will be able to manage my codes accordingly and if required poll the registry.

Thanks you have been very helpful.

<i><font color="#663300">Hello Bhavbhuti, perhaps you know the answer, but I'll write what I know about it:

After testing a bit I've understood that the way of getting and saving the preferences is:

IF the settings are written in the registry
...Get them from the registry
ELSE
...IF exists DBPATHS.DBF
......Get the DBC path from the file
......IF the record does not exist
.........Get the default values
.........Show the User Preferences form
......ELSE IF the DBC exists
.........Get the settings from the file
.........Show the User Preferences form
......ELSE
.........Show an error message - not the best option
......ENDIF
...ELSE
......Show an error message - I supose it can be corrected
...ENDIF
ENDIF

I think the best way, without modify the code, is to distribute DBPATHS.DBF ZAPped, so the first time the user runs the app he will see a form with the default values. Then this settings will be saved in the registry and the DBPATHS.DBF file will not be used anymore.

If you don¥t use the standard .DATA and .DATAREMOTE paths then you must fill the records of DBPATHS.DBF with the correct values.

Well, sure there¥s a better way of do all this work...

Best Regards.
Miquel Angel Guerrero

<i><font color="#663300">
Q1. Is DBPaths.DBF required or not? (I was not able to start my distributed app without DBPaths.DBF and then I had to manually modify the paths to reflect DATA, SECURITY and CBMeta respectively)

Q2a. Is it required to be distributed to the clients (who may have installed into a path not known at development time, see above)?
Q2b. If so then is it supposed to be ZAPped and then distributed (as it contains development time paths, see above)?

Q3a. If DBPaths.DBF is required then what does the path for local and remote in Users Preferences mean?
Q3b. If both of them are there (as it is right now) which of them takes precedence?

Q4. If the paths in User Preferences is not used, then how to find out if local or remote DBC is used on a given machine from DBPaths using functions and not simple brute force of opening and seeking DBPaths.DBF?

Q5. <g> Answers to any other questions that may arise after more experience with DBPaths.DBF and User Preferences?
</font></i>

</font></i>

Regards
Bhavbhuti
 
©2002 Bhavbhuti Nathwani
<-- Prior Message New Search Next Message -->