P
Paul W
In a standalone module (VB) behind my asp.net application, I have a couple
of utility routines that do a simple (fixed) data-retrieval (eg. "select
permissions from tblusers where userid=" & thisuser.
I figured I'd be smart and save multiple db calls for the same page request
by doing:
Function GetPerms() as string
Static myperms as string
if myperms="" then
{get value from db}
myperms=valueFromDb 'store the retrieved data in a Static variable for
use on the next request
else
GetPerms=myperms
endif
End Function
Well, blow me down, I find that the static values persist across different
page requests - even across multiple browser-sessions!!!
Can someone please enlighten me as to what's goin on here?
Thanks,
Paul.
of utility routines that do a simple (fixed) data-retrieval (eg. "select
permissions from tblusers where userid=" & thisuser.
I figured I'd be smart and save multiple db calls for the same page request
by doing:
Function GetPerms() as string
Static myperms as string
if myperms="" then
{get value from db}
myperms=valueFromDb 'store the retrieved data in a Static variable for
use on the next request
else
GetPerms=myperms
endif
End Function
Well, blow me down, I find that the static values persist across different
page requests - even across multiple browser-sessions!!!
Can someone please enlighten me as to what's goin on here?
Thanks,
Paul.