Article View: borland.public.cppbuilder.database.ado
Article #3326Re: TADOQuery inside a TThread
From: Robert A. Vasquez
Date: Thu, 19 Sep 2002 16:53
Date: Thu, 19 Sep 2002 16:53
31 lines
1749 bytes
1749 bytes
When using ADO components in a thread make sure you included...
create TADOQuery's etc..
void __fastcall YourThread::Execute()
{
CoInitialize(NULL);
Start using the ADO components...
CoUninitialize();
}
"Steve" <steve_alettoANTI@SPAMhotmail.com> wrote in message
news:3d89874a@newsgroups.borland.com...
> Hi all,
>
> how can I use TADOQuery inside a TThread? Is it possible? I've already
tried
> something, but the thread locks itself when I use TADOQuery...
>
> For example the following line causes the problem (except if I put it in
the
> thread constructor):
>
> TADOQuery *MyQuery = new TADOQuery(NULL);
>
> TIA,
>
> Steve.
>
>
>
>
Technical Details
Message-ID:
<3d8a0194@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!news-hub.cableinet.net!blueyonder!nntp2.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3d89874a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,4e12a5ae0392282c X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-09-19 10:04:09 PST From: "Robert A. Vasquez" <rvasquez2001@yahoo.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3d89874a@newsgroups.borland.com> Subject: Re: TADOQuery inside a TThread Date: Thu, 19 Sep 2002 09:53:16 -0700 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 63.194.7.130 Message-ID: <3d8a0194@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1032454548 63.194.7.130 (19 Sep 2002 09:55:48 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!news-hub.cableinet.net!blueyonder!nntp2.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail