Article View: borland.public.cppbuilder.database.ado
Article #3381Re: TADO Objects and DLL's
From: Jason Lewis
Date: Thu, 05 Sep 2002 21:07
Date: Thu, 05 Sep 2002 21:07
32 lines
2110 bytes
2110 bytes
Call CoInitialize(NULL) before using ADO objects.
"Keith Willis" <nnetsoft@bigpond.net.au> wrote in message
news:3d6ed2f2$1@newsgroups.borland.com...
> Dear All,
>
> I have recently tried to pass pointers to a TADOConnection and TADOQuery
> into a "C" linkage exported function in a DLL. When I attempt to access
any
> of the TADO object properties within the DLL, it seems to work fine until
I
> close down my calling app which then crashes on exit.
>
> Because of this I attempted a different approach passing only the
Connection
> String to the DLL as a null-terminated string with local copies of the
> TADOConnection and TADOQuery objects in the DLL, (actually dropped on a
> dialog box form contained in the DLL). This was even worse As soon as I
> attempted to connect to the Microsoft SQL Server 2000 database using the
> TADOConnection object in the DLL I got an exception ("CoInitialise not
> loaded") or something like that.
>
> At this point, I've given up. Is there some fundamental problem with
using
> TADO objects in DLL's?
>
> Cheers,
> Keith.
>
>
>
>
Technical Details
Message-ID:
<3d77c792$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!news.stealth.net!news.stealth.net!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3d6ed2f2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,bf3cac4e40531b0 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-09-05 15:18:58 PST From: "Jason Lewis" <rj.lewis@forwardadvantage.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3d6ed2f2$1@newsgroups.borland.com> Subject: Re: TADO Objects and DLL's Date: Thu, 5 Sep 2002 14:07:38 -0700 Lines: 34 Organization: Forward Advantage, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 NNTP-Posting-Host: 63.202.53.67 Message-ID: <3d77c792$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1031260050 63.202.53.67 (5 Sep 2002 14:07:30 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!news.stealth.net!news.stealth.net!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail