Subject Re: [IBO] Multiple instansiation of a TdataModulw with IBO
Author Bengt Skogvall
Hi Harald,

well, I made a simple test and created two datamodules in two differnet
sessions. The name was not changed in any way. I stored with one session a
value and tried to read it out in another. The dataModules were really
different!

Perhaps you are describing another case? I am not using the global variable
of the TdataModule. Instead I am storing the DataModule in the associated
Session class.

I am confused,
Bengt




<nibler@...> schrieb im Newsbeitrag
news:3EDB1CBA.F7701A82@......
> Hi Bengt
>
>
> > Well, I tried it, and it worked, partially. Setting the name:='' made it
> > impossible for a e.g. TiwDBlabel located in another Form to find its
data.
> > Why is it needed?
>
> To set the name of the datamodule to either '' or just a random name is
> needed, because when the datamodul is created, the Borland code checks if
> a datamodule with the given name already exists in memory. If so, there
> will no next instance be created.
>
> The result is, that multiple forms, that make use of this datamodule will
> all access the same dataset. You can easily make a demo with 2 or more
> forms and if you move the datapointer in one form, you will see it moving
> in the other form as well.
>
>
> Harald
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>