Connecting Tech Pros Worldwide Help | Site Map

Merits of CustomProperty vs. form parameter

Lauren Quantrell
Guest
 
Posts: n/a
#1: Nov 12 '05
I'm wondering which technique will result in a faster process, Method
A or Method B (or some other method I haven't figured out!)

When a user opens my database, the user must login with name/password.
I store that value as UserID(as an integer based on the user's
UniqueID in tblEmployees) and it is used throughout the application.
In my Access2000 .mdb applications, I have just created Public UserID
as integer in a module.

Will it be faster to call UserID in my Access2000 Stored Procedures
as:

Method A
UserID is stored as an unbound field on my siginin form:
Forms!frmSigninName.UserID

Method B
UserID is a custom property and called like this:

Function getUserID() As Integer
Dim myID
myID = Application.CurrentProject.Properties("UserID")
getUserID = myID
End Function

The goal is to find the fastest and safest way (one not affected by
code breaks, such as Public UserID as integer in a module.)
Any help is appreciated.
lq
Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Merits of CustomProperty vs. form parameter


On 3 Nov 2003 07:14:32 -0800, laurenquantrell@hotmail.com (Lauren
Quantrell) wrote:
[color=blue]
>I'm wondering which technique will result in a faster process, Method
>A or Method B (or some other method I haven't figured out!)
>
>When a user opens my database, the user must login with name/password.
>I store that value as UserID(as an integer based on the user's
>UniqueID in tblEmployees) and it is used throughout the application.
>In my Access2000 .mdb applications, I have just created Public UserID
>as integer in a module.
>
>Will it be faster to call UserID in my Access2000 Stored Procedures
>as:
>
>Method A
> UserID is stored as an unbound field on my siginin form:
> Forms!frmSigninName.UserID
>
>Method B
> UserID is a custom property and called like this:
>
> Function getUserID() As Integer
> Dim myID
> myID = Application.CurrentProject.Properties("UserID")
> getUserID = myID
> End Function
>
>The goal is to find the fastest and safest way (one not affected by
>code breaks, such as Public UserID as integer in a module.)
>Any help is appreciated.
>lq[/color]

Why not use Access' builtin user and group security? Then the user is
available at all times with the CurrentUser function.

- Jim
MeadeR
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Merits of CustomProperty vs. form parameter


If speed is the issue then I WOULD use the public/global approach -
I'm pretty sure that there's no real significant performance
difference with either of your two approaches - especially since it's
only a single field called a limited number of times.

laurenquantrell@hotmail.com (Lauren Quantrell) wrote in message news:<47e5bd72.0311030714.3e8582fe@posting.google. com>...[color=blue]
> I'm wondering which technique will result in a faster process, Method
> A or Method B (or some other method I haven't figured out!)
>
> When a user opens my database, the user must login with name/password.
> I store that value as UserID(as an integer based on the user's
> UniqueID in tblEmployees) and it is used throughout the application.
> In my Access2000 .mdb applications, I have just created Public UserID
> as integer in a module.
>
> Will it be faster to call UserID in my Access2000 Stored Procedures
> as:
>
> Method A
> UserID is stored as an unbound field on my siginin form:
> Forms!frmSigninName.UserID
>
> Method B
> UserID is a custom property and called like this:
>
> Function getUserID() As Integer
> Dim myID
> myID = Application.CurrentProject.Properties("UserID")
> getUserID = myID
> End Function
>
> The goal is to find the fastest and safest way (one not affected by
> code breaks, such as Public UserID as integer in a module.)
> Any help is appreciated.
> lq[/color]
Lauren Quantrell
Guest
 
Posts: n/a
#4: Nov 12 '05

re: Merits of CustomProperty vs. form parameter


I am not using Access' builtin security for numerous administrative reasons.
Without it, CurrentUser returns simply "admin", which is of course not satisfactory.
lq

JimNOT@NOTdatacentricsolutions.com (Jim Allensworth) wrote in message news:<3fa680c3.6276875@netnews.comcast.net>...[color=blue]
> On 3 Nov 2003 07:14:32 -0800, laurenquantrell@hotmail.com (Lauren
> Quantrell) wrote:
>[color=green]
> >I'm wondering which technique will result in a faster process, Method
> >A or Method B (or some other method I haven't figured out!)
> >
> >When a user opens my database, the user must login with name/password.
> >I store that value as UserID(as an integer based on the user's
> >UniqueID in tblEmployees) and it is used throughout the application.
> >In my Access2000 .mdb applications, I have just created Public UserID
> >as integer in a module.
> >
> >Will it be faster to call UserID in my Access2000 Stored Procedures
> >as:
> >
> >Method A
> > UserID is stored as an unbound field on my siginin form:
> > Forms!frmSigninName.UserID
> >
> >Method B
> > UserID is a custom property and called like this:
> >
> > Function getUserID() As Integer
> > Dim myID
> > myID = Application.CurrentProject.Properties("UserID")
> > getUserID = myID
> > End Function
> >
> >The goal is to find the fastest and safest way (one not affected by
> >code breaks, such as Public UserID as integer in a module.)
> >Any help is appreciated.
> >lq[/color]
>
> Why not use Access' builtin user and group security? Then the user is
> available at all times with the CurrentUser function.
>
> - Jim[/color]
Closed Thread