Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance costs of frequently opening a recordset...

Status
Not open for further replies.

MeisoT

Technical User
Apr 25, 2004
43
US
I need to be able to log approximately 50 users out of an Access 2000 database at any given time so that maintenance can be performed. I am using the standard method of setting up a back-end table with one field that toggles between True, when I need the users out of the database, and False, when they are not kicked out. The timer event is set on the form the users have open during the day. The Timer interval on the form is set to check the back-end table every 15 minutes.

My question is, what are the performance costs of opening a recordset every 15 minutes to check the back-end database? Is there a way to keep the recordset open so that all you have to do is check the value of the field? What is the most efficient way to check the value of this field without degrading performace?

I need to be able to kick the users out at any given time during the day and also at the end of each day around midnight. Any ideas will be appreciated.



Thanks.
 
How are ya MeisoT . . . . .

At the end of your code dealing with the recordset, if the rcordset variable is say [blue]rst[/blue], enter:
Code:
[blue]   rst = Nothing[/blue]
Put the cursor on Nothing and hit F1!

[purple]Hope this helps . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
MeisoT,

Depends on the size of the recordset and how you're opening it up (Snapshot, Dynaset, etc...).

It sounds like you're opening a one record, single field table. In which case, unless the bandwidth on your LAN is truly miniscule, once every fifteen minutes will have no performance impacts at all. I tend to check the value every 30 seconds or so and I store a flag against individual users (in case I want to kick individuals rather than everyone). My messaging system works in a similar way. Any performance impacts are still unnoticeable.

Ed Metcalfe.


Please do not feed the trolls.....
 
You are correct Ed2020. I did not give the complete details, but I am indeed opening a snapshot recordset on a one record, single field table. I think your method of maintaining a flag for each individual user is an excellent idea and I think I will try it.

Thanks for the excellent advice!!!
 
MeisoT,

If you can think of a way to send it without posting email addresses I'd be happy to send some sample code.

Ed.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top