Article View: borland.public.cppbuilder.database.multi-tier
Article #516Re: ClientDataSet and multi-threading
From: 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. > >
Technical Details
Message-ID:
<3bae7f8d_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!192.50.8.47!newsfeed.media.kyoto-u.ac.jp!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3ba73780_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,224d69287f4094 X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2001-09-23 17:38:55 PST From: "Nobuya Higuchi" <nobuya@mbf.sphere.ne.jp> Newsgroups: borland.public.cppbuilder.database.multi-tier References: <3ba73780_2@dnews> Subject: Re: ClientDataSet and multi-threading Date: Mon, 24 Sep 2001 09:41:20 +0900 Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 210.165.191.187 Message-ID: <3bae7f8d_1@dnews> X-Trace: dnews 1001291661 210.165.191.187 (23 Sep 2001 17:34:21 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!192.50.8.47!newsfeed.media.kyoto-u.ac.jp!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews