Datamodule in a DLL hangs on Create

ldsandon

Member³
I have a DLL which exports a function WriteXMLData(Data: PChar): longbool. Internally the DLL uses a TDatamodule with a TOracleSession, some TOracleDatasets, a TDatasetProvider and a TXMLTransformClient. When I try to create the datamodule, it hangs (precisely, in TReader.ReadComponent, nested procedure CreateComponent, line Result.Create(Owner) ).
I am evaluating the trial version (3.4.6.4, using Delphi 6) to see if it the right choice for our application (a large application for the Italian Police), maybe there is something in the "trial check" code that block everything (I am testing within the IDE)?
When I used it in a TRemoteDatamodule everything worked, in the DLL no!

------------------
LDS
 
It looks to happen only if I try to create the datamodule in the library being..end; section. If I try to create the datamodule within the exported function (which is called after the lib has been loaded) it works.

------------------
LDS
 
I doubt that it is an issue with the trial check, because it only causes an exception. You never know though.

Does your TDataModule connect when it is created (e.g. TOracleSession.Connected = True, or you explicitly connect in the OnCreate event handler)?

------------------
Marco Kalter
Allround Automations
 
I connect in the OnCreate event, anyway I had the session connected at design time and DesignConnection = True

------------------
LDS
 
Is the hang-up fixed if you do not connect in the OnCreate event?

------------------
Marco Kalter
Allround Automations
 
Back
Top