User Preferences located in a seperate file 
Author Message
 User Preferences located in a seperate file

I have an Access app with a front end/back end setup. I store some of my
user preferences in a .ini file, located in the same directory as the back
end data. I have some functions that read and write to this .ini file
whenever I need to get a preference value.

My question is: would it make more sense to read these values once, and
store them in global variables, or should I continue with the current
solution of reading that file each time I want to return a value? Which will
be better for performance?

Thanks,
Louis



Wed, 04 May 2005 04:02:09 GMT  
 User Preferences located in a seperate file
I'm not sure I see the point in storing the preferences outside the
database in a separate file.  However, if I were going to do that, I'd
probably keep the values private but static, accessed only via
functions that can test to see if the preferences need to be
loaded/reloaded from the file.  The idea would be to speed things up
by doing the I/O only once, the first time it's actually needed.

It occurs to me it might be nice to encapsulate all this functionality
in a class module, and create a global instance of that module on
startup.  When an instance of the class is created, it loads the
values from the file, and subsequently returns them as properties of
the class.  That's just an idea.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Quote:
> I have an Access app with a front end/back end setup. I store some
of my
> user preferences in a .ini file, located in the same directory as
the back
> end data. I have some functions that read and write to this .ini
file
> whenever I need to get a preference value.

> My question is: would it make more sense to read these values once,
and
> store them in global variables, or should I continue with the
current
> solution of reading that file each time I want to return a value?
Which will
> be better for performance?

> Thanks,
> Louis



Wed, 04 May 2005 04:33:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Use of app.config and saving user preferences...

2. Advice on saving array of users preferences

3. User Preferences

4. managing user preferences...opinions needed

5. Saving user preferences

6. Default User Preferences

7. How to seperate MM/DD/YY into seperate fields in access

8. Preferences File

9. Locating user on NT network using VB?

10. VB5 Setup wizard asks: locate user?

11. Locate USER in setupwizard

12. Locate User

 

 
Powered by phpBB® Forum Software