[AccessD] Where to place path constants?

John Colby jwcolby at gmail.com
Sun Mar 6 13:04:24 CST 2022


I use what I call SysVars - System Variables.  I place them in a
usysTblSysVars which makes them invisible to the users.

SV_ID                 Autonumber PK
SV_VarName     Short Text     Variable Name
SV_VarValue      Short Text     Variable Value
SV_Memo           Long Text     Explanation for variable
SV_UserEditable Yes/No         Should be made user editable
SV_AllowOverride Yes/No        Can be overriden by the next table being
read in.  There may be SysVars that you don't want overridden

I then build a class to pull the sysvars out into sysVarinstances
Which I load into a class which reads all the sysvars from the table,
builds the instances, and loads the instances into a collection

This essentially caches them in memory and anywhere in the program where I
need to reference them in code, or even in a query, they are available to
me.

On Sun, Mar 6, 2022 at 8:08 AM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> I'm revising an app that assumes some paths based on the drive letter and
> the project path. At the moment, it uses constants that are scattered
> throughout the app. I want to move them all into a single module,
> tentatively called modPathConstants, to minimize the find and replace
> hassles. Actually, the only thing that will change is the drive letter. The
> directory and subdirectory names will remain the same.
> I vaguely recall a function called ProjectPath() or somesuch. Guidance
> requested.
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list