C
cmdex_VABCH via AccessMonster.com
I have an older database I am now responsible for. It appears that the
original programmer set a global database definition at startup and wanted to
use it through out the program when ever he needed it. Well the database has
been worked and reworked so many times that the single database definition
just isn't used anymore except on occassion in the original code.
Example:
~At startup in called Module M:
dim GblDb as Database
~module M, function F:
set GblDb = CurrentDb()
~form X:
set y = GblDb.OpenRecordset(.....
~module Z:
set b = GblDb.OpenRecorset(......
set GblDb = Nothing
~form A:
set c = GblDb.OpenRecorset(....
My question is, does a single definition used through out the program have
any significant advantages, other than not having to define a db definition
for each function? When does the global definition lose scope?
I should mention that the database is a front end, with an Oracle back end,
and resides on a server with as many as 50 concurrent users.
Some insight would be helpful. Thank you.
original programmer set a global database definition at startup and wanted to
use it through out the program when ever he needed it. Well the database has
been worked and reworked so many times that the single database definition
just isn't used anymore except on occassion in the original code.
Example:
~At startup in called Module M:
dim GblDb as Database
~module M, function F:
set GblDb = CurrentDb()
~form X:
set y = GblDb.OpenRecordset(.....
~module Z:
set b = GblDb.OpenRecorset(......
set GblDb = Nothing
~form A:
set c = GblDb.OpenRecorset(....
My question is, does a single definition used through out the program have
any significant advantages, other than not having to define a db definition
for each function? When does the global definition lose scope?
I should mention that the database is a front end, with an Oracle back end,
and resides on a server with as many as 50 concurrent users.
Some insight would be helpful. Thank you.