Selected record in multi user enviroment (1 Viewer)

Isskint

Slowly Developing
Local time
Today, 18:42
Joined
Apr 25, 2012
Messages
1,302
Hi all

I have a table that includes a boolean field called recSlct. The purpose of this field is to allow a user to select multiple records on a continuous form to then carry out a range of tasks (view detailed data, print reports, update statuses etc). This works all well and good in single user situation.
However in a multiuser environment, if user A selects records 1,3,8 and user B selects 4,9,12 at the same time, the recrodsets for the subsequent actions/queries/forms/reports etc use all the selected records.

I am thinking it could be achieved if the current users ID is stored also with recSlct and add the extra condition to the underlying queries. But is it possible to restrict the recordsets for each users request via a setting or property?

Database on A2013
Configuration is separate BE with 1 front end accessed by multiple users.
 

Minty

AWF VIP
Local time
Today, 18:42
Joined
Jul 26, 2013
Messages
10,374
This is your problem
Configuration is separate BE with 1 front end accessed by multiple users.
In a shared FE you couldn't identify the user separately. Each user should have their own FE, and then your record sets would work.
 

Isskint

Slowly Developing
Local time
Today, 18:42
Joined
Apr 25, 2012
Messages
1,302
Hi Minty

Deliberately avoided multiple front ends initially to make updates easier, but that may be the solution now.

Do you think storing the user ID would work and which is the better approach?
So a query would be look like;
SELECT A,B,C FROM TABLE WHERE recSlct = TRUE AND recSlctID = CurrentUser
 

Minty

AWF VIP
Local time
Today, 18:42
Joined
Jul 26, 2013
Messages
10,374
I always save the current user for transaction records, however if they had a separate front ends, it wouldn't be necessary, as your recordsets would behave correctly, as they are local to the machine / user running the process.
 

jdraw

Super Moderator
Staff member
Local time
Today, 13:42
Joined
Jan 23, 2006
Messages
15,394
Isskint,

Deliberately avoided multiple front ends initially to make updates easier, but that may be the solution now.

As Minty suggests, it isn't multiple front ends per se, it is a copy of the same front end on each user's PC. So there is really only 1 front end involved (to be maintained).

There are many forum threads and articles on this subject; and for checking the user's current Front end version and replacing it automatically with the latest most current version, if/when you have made changes/updated to the front end.

Having multiple users sharing a single instance of a front end is considered a poor practice that will lead to issues.

See this and this for more info and links.

Good luck.
 
Last edited:

Isskint

Slowly Developing
Local time
Today, 18:42
Joined
Apr 25, 2012
Messages
1,302
Hi jdraw

Many thanks for the links.

It is in the plans to put copies of the front end on each users PC - or at least each users My Docs folder on the server. Will that still work as 'seperate' instances of the FE?
 

sneuberg

AWF VIP
Local time
Today, 10:42
Joined
Oct 17, 2014
Messages
3,506
I don't see how having separate front ends would solve this problem unless the checkbox is moved to a front end table somehow. Would you test this once you have separate front ends and see if it actually works as everybody seems to be suggesting.

Of course if you distinguish the recSlct with the userids then I suspect it will work regardless of whether the frontend is shared or not.
 

Minty

AWF VIP
Local time
Today, 18:42
Joined
Jul 26, 2013
Messages
10,374
Hi jdraw

Many thanks for the links.

It is in the plans to put copies of the front end on each users PC - or at least each users My Docs folder on the server. Will that still work as 'seperate' instances of the FE?

No - I would avoid running FE's over a network connection. You will have performance and other issues. Put a FE copy on the users local hard drive, I would recommend in a dedicated folder within their My Documents folder. We have had issues on updating DB's on Windows 10 with folders on the root drive.
 

Users who are viewing this thread

Top Bottom