How to use DataModule in MDI-environment ???

Hey!

I'm using Delphi's C/S -version in an MDI-app and I'd like to make my
DataModules working as an instance (as my forms too) so that the database
record-pointers are in sync only in the active form.

eg. When I open two instances of the same form and the form's
database-components datasources are in the same DataModule, the rowchance
in one Form's DBGrid is showing also in the other Form's DBGrid (both
Form's DBGrid's are sharing the same table/Tquery).

Yes, I could copy all the datasources/TTable/TQuery -components to the
form, but isn't that a silly way to use datamodules???

If I create the datamodules as instances before I create the MDI-Child
Forms and have the Form's DBGrid's datasources point to the just created
datamodules datasources, I assume that I'd have a better MDI
database-app.

But, I haven't figured that yet that how I could do that?

Has anyone used that kind of solution or is there a better solution ???

I assume that there is a way to use datamodules in the MDI-environment so
that all opened forms visual datacomponents have their own
database-record-pointers and there is only one connection through
TDataBase-component to the DB.

Hopefully waiting discussion on the subject!!! :)

------------------------------------------------------------
|Arto Laurila             Arto Laurila                      |
|ArtWare Computing Co.    Cap Gemini                        |
|artw...@sci.fi           laur...@cap.fi                    |
------------------------------------------------------------