How do Modules created during development behave after the split db in multiuser envi

mdbBound

Registered User.
Local time
Today, 06:14
Joined
Dec 8, 2003
Messages
43
Hi,

What will happen to my modules, with functions and public variables when I split my database and in a multiuser environment?

I have created 2 modules. One of them has functions to get the next available numbers. The other one holds the Public Variable names that i need to around my application. My application will later be split FE/BE and the FE will be distributed to 10 users. Some tables will reside in the network drive.

One of the Public variables contained in one of the Modules is UNextWnum. Each User will use this variable to store the value generated from a textbox in one of the forms (FE). The variable will later be called to be used as a reference. Since I have 10 users and my database will be split

1. How do Modules, public functions and public variables behave in multiuser environment?

2. If USERA use the FE and, due to that proces has generated the value of WNext001, stored it in UNextWnum Public variable, and request for that value later, what value will it return? Does USERB gets the same value of WNext001 if he request for the value of Public variable UNextWnum? In this case, the expected return value for USERB should not be WNext001.

I guess my question is How does Public variables declare in modules behave in a multiuser environment? I'm thinking since they are Public and will now belong to one big database with 10 users, will these public variables be treated one and the same for all the 10 users. Does USERA's Public Variable UWNextNum value be different from USERB's Public Variable UWNextNum value?

Thanks for the clarification.
 
As each user should be distributed a seperate front end each then they each have their own set of modules. Therefore one instance of a variable over the ten opened front ends will reflect only that user's session and not any others.
 
Thanks Mile,
 
I guess my question is How does Public variables declare in modules behave in a multiuser environment? I'm thinking since they are Public and will now belong to one big database with 10 users, will these public variables be treated one and the same for all the 10 users. Does USERA's Public Variable UWNextNum value be different from USERB's Public Variable UWNextNum value?
- It doesn't matter if 10 users open 1 db or each user opens his own db, each user has a copy of the db objects he is using in memory. They are not shared. So user1 can be looking at rec1 on form1 and user2 can be looking at rec5 on form1. There is NO conflict. Each user has his own memory space on his own PC so variables are local to that user's instance. In fact a user could open the same db TWICE and each instance would occupy a separate memory space and so global variables would be separate as well. FldA could contain 100 in instance1 and fldA could contain 200 in instance2 with no problem.

The only place you run into trouble with a shared db is when you use Make Table queries or modify db objects in code. UserA could run a MakeTable query and create temp1 with a set of data. If UserB ran the same MakeTable query, he would get an error because the table already exists. He could then delete the table, (assuming that UserA wasn't using it at that instance) and rebuild it with a different set of data and UserA would be none the wiser.

Bottom line here - NEVER use temp tables in a shared database (unless you're going to include the UserID in the table name and even then, temp tables are a poor solution). NEVER modify objects via code in a shared database.
 

Users who are viewing this thread

Back
Top Bottom