Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Florin Ciodaru
Tue, 18 Sep 2001 12:01
ClientDataSet and multi-threading
Author: Florin Ciodaru
Date: Tue, 18 Sep 2001 12:01
Date: Tue, 18 Sep 2001 12:01
19 lines
1466 bytes
1466 bytes
Hi, I develop a multi-tier application wich use a simple MIDAS server to acces a MSSQL 7 database. On client side I use on a DataModule the following components : a DCOMConnection and a ClientDataSet. Evrithing work just fine in a single thread application. When i move to a multi-thread application (in a child thread at runtime i create a new instance of DataModule) when i try to set the Active property of ClientDataSet i receive this EOleSysError error "CoInitialize has not been called". How can i pass this error ? Thanks in advance.
Re: ClientDataSet and multi-threading
Author: Nobuya Higuchi
Date: Mon, 24 Sep 2001 00:41
Date: Mon, 24 Sep 2001 00:41
35 lines
1927 bytes
1927 bytes
Hello, You need to initialize DCOM library in each thread. Try put CoInitialize(0); in each thread before you use Midas. You also need to put CoUninitialize(); at the end of each thread. Nobuya Higuchi "Florin Ciodaru" <cflorin@syqon.com> wrote in message news:3ba73780_2@dnews... > Hi, > > I develop a multi-tier application wich use a simple MIDAS server to acces a > MSSQL 7 database. > > On client side I use on a DataModule the following components : a > DCOMConnection and a ClientDataSet. > > > Evrithing work just fine in a single thread application. > > When i move to a multi-thread application (in a child thread at runtime i > create a new instance of DataModule) when i try to set the Active property > of ClientDataSet > i receive this EOleSysError error "CoInitialize has not been called". > > How can i pass this error ? > > Thanks in advance. > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads