Article View: borland.public.cppbuilder.database.ado
Article #5743Re: creating TADOstoredProc inside thread context
From: Alexei Karas
Date: Fri, 02 Mar 2001 09:14
Date: Fri, 02 Mar 2001 09:14
32 lines
1817 bytes
1817 bytes
Try to do exactly what it says;)
Execute in TThread->Execute()
::CoInitialize();
TADOStoredProc *adoSP = new TADOStoredProc(NULL);
[your stuff goes here]
::CoUninitialize();
HTH,
Alexei
"Ozan Kilicoglu" <ozan.kilicoglu@eee.deu.edu.tr> wrote in message
news:3a9ea96b_2@dnews...
> when I try to execute...
>
> TADOStoredProc *adoSP = new TADOStoredProc(NULL);
>
> this line of code from the thread's context ( in TThread->Execute()
> method ).
> its ended with an error message:
> EOleSysError... 'CoIn�tialize has not been called'
>
> Of course, it works when called from Thread's constructor ( which belongs
> to App. context.) However, I don't want to use this solution because I
want
> each thread to manage its own TADOStoredProc connection. How can I execute
> this line from within thread's context? if I can not, what should I do?
>
> thanks in advance
>
>
Technical Details
Message-ID:
<3a9f65aa_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!sunqbc.risq.qc.ca!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!212.109.63.210References:
<3a9ea96b_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,7247137ae13bcf7b X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-03-02 01:26:05 PST From: "Alexei Karas" <nospam_AlexKaras_thatsextraaswell@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3a9ea96b_2@dnews> Subject: Re: creating TADOstoredProc inside thread context Date: Fri, 2 Mar 2001 11:14:28 +0200 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 212.109.63.210 Message-ID: <3a9f65aa_1@dnews> X-Trace: 2 Mar 2001 01:19:38 -0800, 212.109.63.210 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!sunqbc.risq.qc.ca!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!212.109.63.210