Temp Vars in Multi user environments

aussie92

Registered User.
Local time
Today, 15:00
Joined
Jan 14, 2013
Messages
13
Hey Everyone - happy MLK Day!

Quick question....Can I use tempvars in a multi-user environment wihout really messing things up?

Basically, I have an application that I will split into FE an BE and I want the users to alias the front end so they do not have to redownload anytime I update a form. My users navagate everything with forms an tempvars that catch what they are asking to do. I need to know if, because most of the actions are based on tempvars, multiple users will mess up the way the database pulls and stores data.

For example, if I have a query that pulls their percentage for the month, it does it based on what name is in a certain field (passed to a query via a tempvar). If someone else access it and updates the field after the first user, will the query for both of them be based on the second users name (the latest tempvar value) or does the tempvar store on the individual computer and the queries pull from the individual computers?

Not sure if that makes sense. Thanks for any help!!
 
Variables are really just pointers to where data is stored in memory on the local computer, so in a multi-user environment each computer stores it's own version of those variables, you should be ok given this situation.

However if you have multiple users using the same front end on a shared drive, then you are in for some trouble, make each user copy their own version of the front end locally and run it, there will be far fewer problems in the long run.
 
"I want the users to alias the front end so they do not have to redownload anytime I update a form"
If you have a FE and BE database, the database will perform best if each user has their own FE, but this will require updating if you make changes to the FE. One method round this is to have an up to date copy of the FE on a shared drive and have the users start the database from a shortcut only the shortcut actually runs a small batch file that is written to copy down the FE file and then opens Access and the FE

"For example, if I have a query that pulls their percentage for the month, it does it based on what name is in a certain field (passed to a query via a tempvar). If someone else access it and updates the field after the first user, will the query for both of them be based on the second users name (the latest tempvar value) or does the tempvar store on the individual computer and the queries pull from the individual computers"

I'm not quite sure what you're doing here but it sounds like you should be writing the query results to a table including the username

David
 
http://www.access-programmers.co.uk/forums/showthread.php?t=196020&highlight=citrix
Thanks to Bob Larson (see solution) my Citrix is working really great.
Here is the code that takes my single Front-End at a file location and creates a copy into each user's folder.
For an update, I deposit the new front-end file. When each user opens Citrix - it creates a copy of the front-end.
This is along the idea above - have each user call a short cut to a file in their own folder.
This is the code with out all the explanation:

Code:
@echo Please wait while the version of the database you requested is updated.

@echo off


MD "L:\Database\"

xcopy /Q /Y R:\FE\Current\IRDB.mde "L:\Database\*.*"

TYPE NUL | choice /c:delay /td,5 >NUL

Start /max "E:\Microsoft Office\OFFICE11\MSACCESS.EXE" "L:\Database\IRDB.mde" 


exit
 

Users who are viewing this thread

Back
Top Bottom