Subject | Re: [IBO] Multiple instansiation of a TdataModulw with IBO |
---|---|
Author | Bengt Skogvall |
Post date | 2003-05-31T13:55:04Z |
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@......
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 orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>