Subject Re: [IBO] Multiple instansiation of a TdataModulw with IBO
Author Bengt Skogvall
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?

Regards,
Bengt

<nibler@...> schrieb im Newsbeitrag
news:3ED735D7.5848AF3@......
> Hi,
>
> > is it allowed practice to instanciate more than once the same
> > TdataModule containing IBO components (TIB_connection,
> > TIB_transaction, TIBOQuery)?
>
> Yes, I never had any problems with it.
> Just make shure to set the name of the datamodule.
>
>
> procedure TdmMultiInstance.DataModuleCreate(Sender: TObject);
> begin
> Name := '';
> end;
>
> procedure TdmMultiInstance.DataModuleDestroy(Sender: TObject);
> var i,cnt:integer;
> begin
> cnt := ComponentCount-1;
> for i := 0 to cnt do if Components[i].InheritsFrom(TIB_Dataset) then
> with (Components[i] As TIB_Dataset) do begin
> if assigned(IB_Transaction) then begin
> IB_Transaction.CloseWithConfirm;
> end;
> if Active then begin
> Close;
> end;
> if Prepared then begin
> UnPrepare;
> end;
> end;
> end; {DataModuleDestroy}
>
>
> 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/
>
>