Article View: borland.public.cppbuilder.database.ado
Article #2617Re: Documentation on ADO interfaces in adoint.hpp
From: Kovalenko Dmitry
Date: Fri, 25 Apr 2003 06:42
Date: Fri, 25 Apr 2003 06:42
76 lines
3500 bytes
3500 bytes
> Anybody know where I can find documentation on the ADO interfaces in
> adoint.hpp ?
MDAC SDK 2.6
http://www.microsoft.com/downloads/details.aspx?FamilyID=cf5bf48d-9bbb-4ca2-
9b03-4ee000db37ff&DisplayLang=en
see ADO Help - references of user interfaces
Documentation about interfaces, like xxxContructionxxx, not exists.
But you can write simples test programs for them
See this code:
////////////////////////////////////////////////////////////////////////////
////
//reception OLEDB Session from ADODB.Connection
void get_adodb_session(IDispatch* pADODBConnection,IUnknownPtr& spSession)
_THROW_OLE_SPEC_
{
assert(pADODBConnection!=NULL);
spSession.Release();
ADOConnectionConstructionPtr Construct(pADODBConnection);
ADOConnectionConstruction15Ptr Construct15(pADODBConnection);
if(!Construct && !Construct15)
_CREATE_OLE_EXCEPTION("This object is not ADODB.Connection",E_INVALIDARG);
//Veryfed: ADO call AddRef for returned session
if((bool)Construct15)//get pointer to OLEDB session
Construct15->get_Session(&spSession.ref_ptr());
if(!spSession && (bool)Construct)
Construct->get_Session(&spSession.ref_ptr());
if(!spSession)
_CREATE_OLE_EXCEPTION("ADODB.Connection is not initialized",E_FAIL);
//The session successfully is received
}//get_adodb_session
////////////////////////////////////////////////////////////////////////////
////
//reception OLEDB DataSource from ADODB.Connection
void get_adodb_data_source(IDispatch* pADODBConnection,
ole_lib::IUnknownPtr& spDataSource)
_THROW_OLE_SPEC_
{
assert(pADODBConnection!=NULL);
spDataSource.Release();
ADOConnectionConstructionPtr Construct(pADODBConnection);
ADOConnectionConstruction15Ptr Construct15(pADODBConnection);
if(!Construct && !Construct15)
_CREATE_OLE_EXCEPTION("This object is not ADODB.Connection",E_INVALIDARG);
//Veryfed: ADO call AddRef for returned DSO
if((bool)Construct15)//get pointer to OLEDB session
Construct15->get_DSO(&spDataSource.ref_ptr());
if(!spDataSource && (bool)Construct)
Construct->get_DSO(&spDataSource.ref_ptr());
if(!spDataSource)
_CREATE_OLE_EXCEPTION("ADODB.Connection is not initialized",E_FAIL);
//The data source successfully is received
}//get_adodb_data_source
Technical Details
Message-ID:
<1051253045.852198@sunflower.loc>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ea879a4$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,6a4282570282349d X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-04-24 23:48:21 PST From: "Kovalenko Dmitry" <dima@lcpi.lipetsk.ru> Newsgroups: borland.public.cppbuilder.database.ado References: <3ea879a4$1@newsgroups.borland.com> Subject: Re: Documentation on ADO interfaces in adoint.hpp Date: Fri, 25 Apr 2003 10:42:22 +0400 Lines: 78 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit 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 Organization: LCPI Message-ID: <1051253045.852198@sunflower.loc> Cache-Post-Path: sunflower.loc!unknown@main.gdi.loc X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 195.34.226.161 X-Trace: newsgroups.borland.com 1051253045 195.34.226.161 (24 Apr 2003 23:44:05 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail