
Multi record sets and multi databases
I'm pretty sure you'll need separate CDatabases for each of the separate
databases you need to open unless you don't need concurrent access. Then
you would have to close the database opened with your single CDatabase
object, then use it to open another one. Smaller code? maybe. More
efficient? I doubt it, its probably less efficient. More headaches?
certainly.
--
Jean-Fran?ois Davignon
Conservationist and programmer
Quote:
> I've got an application that needs to access multiple tables in multiple
> databases. I'm a little confused on how the interaction between
CRecordSet
> and CDatabase is supposed to work in this case.
> I've built a test app that has a single CDatabase which has multiple
> recordsets{*filter*} off it. In this particular case there is a single
> database with three tables and I can get it to work. I declare a single
> CDatabase in the document and dynamically create the three CRecordSet
> derived objects. Each of the objects is fed the CDatabase at its
creation.
> Can a single CDatabase object be used for multiple tables in multiple
> Access databases? Or does each Access database require its own CDatabase
> object which, in turn, can handle a CRecordSet derived object for each of
> its tables?
> --
> Richard Lewis Haggard
> Haggard & Associates, International
> --------------------------------------------------------
> I have a photographic memory but I seem to have misplaced the film.