🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2954

Re: TADOConnection multi threading?

#2954
From: Giuliano
Date: Wed, 12 Feb 2003 19:44
22 lines
1549 bytes
On Wed, 12 Feb 2003 10:13:15 -0800, "Robert A. Vasquez"
<rvasquez2001@yahoo.com> wrote:

>In my application I would like to make 1 TADOConnection object that can be
>used by multiple threads to execute their own TADOQuerys.  Is this possible
>or do I have to create the TADOConnection inside the thread?  Thanks.

Hi Robert,        

    it's possible, but you have to create a connection for each thread then
invoke both CoInitialize/CoUninitialize functions before you use the ADO
components at thread level.

Also you can try with 

    TInitOle InitOle( COINIT_MULTITHREADED );

HTH

Ciao!

Giuliano
Technical Details
Message-ID: <ko8l4vcuccp6186823pkv1jlbu6qnlf1f7@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e4a9036@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,c884cc33c357a04e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-02-12 11:47:16 PST
From: Giuliano <gcardinali@remove.adhoc.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: TADOConnection multi threading?
Date: Wed, 12 Feb 2003 20:44:26 +0100
Message-ID: <ko8l4vcuccp6186823pkv1jlbu6qnlf1f7@4ax.com>
References: <3e4a9036@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.72.236.130
X-Trace: newsgroups.borland.com 1045079063 81.72.236.130 (12 Feb 2003 11:44:23 -0800)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail