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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple references

Status
Not open for further replies.

JeroenNL

Programmer
Nov 28, 2002
217
NL
Hi there,

I have written a bunch of general VBA functions and put them in an Access database called DAPlibrary.mdb. Several other Access databases now have a reference to DAPlibrary so they can use all functions in this database too. These databases are used by several users so they can be opened simultaniously. Is it wise to have several databases referencing DAPlibrary at the same time or could this lead to errors?


Bye,
Jeroen

A 3d level editor in Delphi
 
An alternative to the above approach would be to still have and maintain all general functions in DAPlibrary but copy the modules in DAPlibrary to all other relevant databases each time I make changes to the functions. It would not be my favorite approach (having multiple copies of the same thing is never a "nice" idea). But I also fear errors when multiple databases have a reference to the same DAPlibrary and various users are accessing these databases at the same time. Comments?

Bye,
Jeroen

A 3d level editor in Delphi
 

There is no issue with the multiple users referencing the functions. There CAN be an issue in your maintenance of the functions. If you are in the midst of making a change and a user references the function, they will use the function 'as is" at the moment of use. A more reasonable approach would be to maintain at least two copies of the cade database (a prouction copy and a development copy) do the develpoment/changes on the seperate copy and only do a quick copy and paste of individual procedures after thorough testing. Even in this scenario, it is at least POSSIBLE to have an occassional error.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
I agree with MichaelRed. To get around the problem of trying to update a Libray database while users are referencing it, I force everyone to exit the their application (this is done programatically). And once everyone is logged out, I update my library database. Then, after the library database is updated, I allow the user's to log back in to their applications.
 
Ok, i'm glad referencing itself causes no problems. But here's another part of the deal: if I use references to DAPlibrary, it means that DAPlibrary is opened every time a user is using a database that has a reference to DAPlibrary. So if I have 9 users all accessing a database containing a reference to DAPlibrary, I have 9x2=18 Access instances running on my server. Would that cause slowdowns in performance?


Bye,
Jeroen

A 3d level editor in Delphi
 
probably not. but it could depend on other factors in your setup. You can (?may?) use VB and make the functions into a .dll and add it to the references. That would avoid the overhead of user count, and permit you to work on the .dll freely within the VB IDE. Again, when you were finished with changes and tests, you could replace the .dll. As far as I know, the replacement would only take place at startup time for your users, and as long as the version number doesn't increment and the calls stay the same it should never impact them. Of course, if the .dll DOES change significantly, you would need to re-do the reference.





MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top