Delphi 10.3.2/RoDA 10.0.0.1481
Remobjects_OpenXML defined for my client project which is working well and I do not use the
I’ve recently tried to convert opening some TDaMemDataTables in a thread using
procedure TPatientData.OpenAsync; begin TTask.Run( procedure begin tbl_Patients.Open; // beforeOpen sets DynamicWhere clause tbl_SomeOtherTable.Open; TThread.Synchronize(nil, procedure begin if assigned(AfterOpen) then AfterOpen(tbl_Patients); // will call back to the calling UI form end ); end ); end;
The table(s) being opened are always on their own TDataModule which has it’s own Channel & Message components (as well as Bin2DataStreamer and RemoteDataAdapter).
In creating each datamodule instance I set the URL of the Channel and the ClientID of the Message from the main Channel and Message components on my ClientDataModule – so I think I’m right in saying this should make it safe to open the table(s) in a thread.
My problem is that I’ve noticed that I’m getting “CoIniitalize has not been called” errors when trying to open these tables in a thread, even though I have
I’ve temporarily solved the issue by wrapping the
.open calls in
CoUninitialize calls but I’d like to be able to use these business data objects in non-Windows platforms.
How can I fix that so that I don’t need to use