Connecting Tech Pros Worldwide Help | Site Map

Merits of CustomProperty vs. form parameter

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 03:01 PM
Lauren Quantrell
Guest
 
Posts: n/a
Default Merits of CustomProperty vs. form parameter

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

  #2  
Old November 12th, 2005, 03:01 PM
Jim Allensworth
Guest
 
Posts: n/a
Default 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
  #3  
Old November 12th, 2005, 03:02 PM
MeadeR
Guest
 
Posts: n/a
Default 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]
  #4  
Old November 12th, 2005, 03:03 PM
Lauren Quantrell
Guest
 
Posts: n/a
Default 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]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.