G
Guest
C#
I am trying to store my connection settings in a config file, mainly so I
can easily change the db that the app connects to without doing a release of
code. I have the config file sorted fine, and I can read the connection
string in and connect. But at the moment everytime a connection is made to
the database to get records, update records insert records etc etc, this file
has to be read back in again. Is this an ok way of doing it, or is there a
better method? Maybe retrieving the string once at login, and somehow
storing it in a global parameter of some kind?? Would storing it in the
reigstry be any better? Is there a performance hit with this, or should I
just settle for this constant disk read?
Thanks
Ste
I am trying to store my connection settings in a config file, mainly so I
can easily change the db that the app connects to without doing a release of
code. I have the config file sorted fine, and I can read the connection
string in and connect. But at the moment everytime a connection is made to
the database to get records, update records insert records etc etc, this file
has to be read back in again. Is this an ok way of doing it, or is there a
better method? Maybe retrieving the string once at login, and somehow
storing it in a global parameter of some kind?? Would storing it in the
reigstry be any better? Is there a performance hit with this, or should I
just settle for this constant disk read?
Thanks
Ste