use of Workspaces.
One reason I use workspace is to start a transaction on 'some' of the
tables, but not on others. As example, let say you get a list of airplanes
landing and takeoff. To VALIDATE the list, someone ask to check that a
takeoff follow a landing (ie, no two consecutive takeoff for the same plane,
no two consecutive landing either). So, I start a transaction on the
movements table, append the data and, one record at a time, check if all the
applicable rules are satisfied. If they are, ok, nice, I 'commit' the
transaction. But if some error occur, I rollback the transaction up to its
start, so I am left with the system as it was before I started the process.
The problem is that the end user will then ask: what was THE error (or the
errorS )? If I have only ONE workspace, I would not write the error in the
movementsErrors table, since that table too would be rolled back to its
initial state, in case of an error, and thus, I won't be able to read
whaterver I wrote to it, while I was processing the data, in the
transaction. So, I create TWO workspaces, one that will be in the
transaction (and eventually rolled back) and one which will NOT be in the
transaction, and thus, unaffected by the possible rollback of the
transaction, and keeping the wanted error log I generated while analysing
the imported data.
use of Databases.
I don't use more than one database object at a time, but I imagine that
someone may find some uses to open the same database multiple times (such as
when using replication), somehow allowing some work while the replication is
preformed in parallel ( is it a good idea? ) without having to open TWO
Access.exe ( ? ). It could also be used to Connect( ) to a 'secure'
database, sending supplied password. But again, I have never had to do it.
DBEngine(0)(0)
which stands for DBEngine.Workspaces(0).Databases(0) is simply the plain
database object that Access made for you, by default.
Vanderghast, Access MVP