473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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
Nov 12 '05 #1
3 1523
On 3 Nov 2003 07:14:32 -0800, la*************@hotmail.com (Lauren
Quantrell) wrote:
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


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

- Jim
Nov 12 '05 #2
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.

la*************@hotmail.com (Lauren Quantrell) wrote in message news:<47**************************@posting.google. com>...
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

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

Ji****@NOTdatacentricsolutions.com (Jim Allensworth) wrote in message news:<3f**************@netnews.comcast.net>...
On 3 Nov 2003 07:14:32 -0800, la*************@hotmail.com (Lauren
Quantrell) wrote:
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


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

- Jim

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
2
by: rg | last post by:
Hi all, I have query about passing a parameter from form to a query. My situation is as follows: I have a query that pulls up some data from a table, however there is a condition that must...
4
by: Ron Rohrssen | last post by:
I want to show a dialog and when the form (dialog) is closed, return to the calling form. The calling form should then be able to pass the child form to another object with the form as a...
21
by: Just Me | last post by:
I've tried in a few places using a variable name Form and it appears to be OK. For example: Public Shared Sub WritePositionsInRegistry(ByVal Form As Form, ByVal SubkeyName As String) Is it OK...
5
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL...
852
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.