Article View: borland.public.cppbuilder.database.ado
Article #3344Re: How can I compile unit with both "ADODB.hpp" and "oledb.h" ?
From: Vassiliev V.V.
Date: Fri, 04 Oct 2002 06:00
Date: Fri, 04 Oct 2002 06:00
111 lines
3340 bytes
3340 bytes
ADODB.hpp includes OLEDB.hpp that includes OLEDB.h. You can just use
Oledb::IDBInitialize *pIDBInitialize;
Oledb::IDBCreateSession *pIDBCreateSession;
Oledb::IOpenRowset *pIOpenRowsetFL;
Oledb::IRowsetFastLoad *pIFastLoad;
Oledb::IAccessor *pIAccessor;
Interface definitions are the same and you should have no problems
(IRowsetFastLoad may not require Oledb::). Another way is to wrtite
OLEDB-specific code in separate unit - anyway you can not use
ADOConnectionConstruction or ADORecordsetConstruction for bulk-copy rowsets.
----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server and MS Jet (MS Access) databases.
"Sorokoletov Gregory" <gsorokoletov@sovintel.net> �������/�������� �
�������� ���������: news:3d9ccf65$1@newsgroups.borland.com...
> Hello,
>
>
>
> I have one small question.
>
>
>
> What can I do, for building unit, in which included both headers:
>
>
>
> "ADODB.hpp" and "oledb.h"
>
>
>
>
>
> For example, if I simply write:
>
>
>
> "Class.h"
>
> :
>
> class TAppendTraffic
>
> {
>
>
>
> IDBInitialize *pIDBInitialize;
>
> IDBCreateSession *pIDBCreateSession;
>
> IOpenRowset *pIOpenRowsetFL;
>
> IRowsetFastLoad *pIFastLoad;
>
> IAccessor *pIAccessor;
>
> };
>
> :
>
>
>
> The compiler generate the following errors:
>
> [C++ Error] AppendTraffic.h(107): E2015 Ambiguity between 'IDBInitialize'
> and 'Oledb::IDBInitialize'
>
> [C++ Error] AppendTraffic.h(108): E2015 Ambiguity between
'IDBCreateSession'
> and 'Oledb::IDBCreateSession'
>
> [C++ Error] AppendTraffic.h(108): E2015 Ambiguity between
'IDBCreateSession'
> and 'Oledb::IDBCreateSession'
>
> [C++ Error] AppendTraffic.h(111): E2015 Ambiguity between 'IAccessor' and
> 'Oledb::IAccessor'
>
>
>
>
>
>
>
> One way is to add "namespace Oledb2" into source file "oledb.h", but I
think
> it is not good idea ::((
>
>
>
>
>
> Sincerely,
>
> Gregory
>
>
>
> How can I compile unit with both "ADODB.hpp" and "oledb.h"?
>
> How can I compile unit with both "ADODB.hpp" and "oledb.h" ?
>
>
>
Technical Details
Message-ID:
<3d9d3520@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!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3d9ccf65$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,172b30594e383497 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-10-03 23:54:07 PST From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> Newsgroups: borland.public.cppbuilder.database.ado References: <3d9ccf65$1@newsgroups.borland.com> Subject: Re: How can I compile unit with both "ADODB.hpp" and "oledb.h" ? Date: Fri, 4 Oct 2002 10:00:48 +0400 Lines: 113 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: 212.188.97.179 Message-ID: <3d9d3520@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1033712928 212.188.97.179 (3 Oct 2002 23:28: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!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail