Coding Preferences

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I would like to get some opinions from everyone on the most efficient way to code. I have a application that sets access rights based upon the users login credentials. Would it be better to
a) Have a function call and retrieve access rights from the table each time a user requests entry to a portion of the application.
b) Create global variables, retrieve all access rights for the user one time and refer to the global variables each time a user requests entry to a portion of the application.
I'm not sure if the overhead of accessing the table out weighs the memory of the global variables, or if yet a better way exists, short of using the built-in security that Jet offers.
Thanks
Bob
 
Each time you want to retrieve information from the table, you're taking
travel time to and from. Depending on the network traffic, number of users,
and processing that is occurring, you may find various processing response
times.

I would be more inclined to use the global variables. Use global variables
sparingly. A few would be fine, too many is a headache.

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Bob Rapp said:
Hello,

I would like to get some opinions from everyone on the most efficient way
to code. I have a application that sets access rights based upon the users
login credentials. Would it be better to:
a) Have a function call and retrieve access rights from the table each
time a user requests entry to a portion of the application.
b) Create global variables, retrieve all access rights for the user one
time and refer to the global variables each time a user requests entry to a
portion of the application.
I'm not sure if the overhead of accessing the table out weighs the memory
of the global variables, or if yet a better way exists, short of using the
built-in security that Jet offers.
 
Back
Top