🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #510

ClientDataSet and multi-threading

#510
From: Florin Ciodaru
Date: Tue, 18 Sep 2001 12:01
19 lines
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.
Technical Details
Message-ID: <3ba73780_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!paloalto-snh1.gtei.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,224d69287f4094,start
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-09-18 05:07:28 PST
From: "Florin Ciodaru" <cflorin@syqon.com>
Newsgroups: borland.public.cppbuilder.database.multi-tier
Subject: ClientDataSet and multi-threading
Date: Tue, 18 Sep 2001 15:01:02 +0300
Lines: 21
Organization: WizApps
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 217.10.215.50
Message-ID: <3ba73780_2@dnews>
X-Trace: dnews 1000814464 217.10.215.50 (18 Sep 2001 05:01:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!paloalto-snh1.gtei.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews