[AccessD] Library Database? .mda or .mdb as referenced library -pros or cons?

Charlotte Foust cfoust at infostatsystems.com
Mon Dec 13 10:01:34 CST 2004


MDA normally designates an add-in library.  To function as an add-in,
there is a specific table required.  To function as a library, not.  We
compile several mdbs into mdes and reference them as libraries,
including the one with all our Redemption code in it. 

Charlotte Foust


-----Original Message-----
From: Dan Waters [mailto:dwaters at usinternet.com] 
Sent: Sunday, December 12, 2004 3:03 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Library Database? .mda or .mdb as referenced
library -pros or cons?


Jim,

After setting a reference to DAO 3.6, and resolving circularity among
function and procedure calls, everything seemed to work correctly. 

I did set a reference to the Library mda.  It appears that doing this
allows the code in the library database to work exactly as if the code
existed in the FE mdb.  I did not get an initial error the first time
the library code was used.

I also tried changing the mda to an mdb.  Everything still worked just
as before.  So now I'm wondering what the difference is between an mda
and an mdb?  Any pros/cons to one or the other when using as a library
database?

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
(AccessD)
Sent: Sunday, December 12, 2004 3:56 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Library Database?

Hi Dan:

Not the way you trying to do it. You can create a new MDB/MDE, with a
module and in that module, a group of public variables, function and
subroutines. This will be your library. The MDB/MDE database will have
to be attached to your caller/main MDB before the functionality can be
accessed. (file/get external data/link...) Just like classes only public
object, in the module can be accessed externally. Note; that none of the
modules objects can be accessed until the module is formally called
(Example: if your library module is initially called from a Form open
event, you will receive an error but the Form's load event works fine.)
and from then on all the functions /subroutines /variables will be
exposed because the whole module is then automatically loaded into
memory.

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters
Sent: Sunday, December 12, 2004 1:27 PM
To: Database Advisors
Subject: [AccessD] Library Database?


I would like to create a separate file (library?) to contain many
procedures and functions which are used by all my customers.



However, most of these either read or write information to the BE using
recordsets.  I tried to set up a library database (.mda), but this
errored out when I tried to dim a recordset variable.  The .mda file
appears to not recognized the DAO prefix.



            dim rst as DAO.Recordset



Is there a way to create a database file to contain procedures and
functions, called from the FE mdb, that can be used read/write to tables
in the BE mdb?



Thanks!

Dan Waters

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list