🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5468

ADO Exception handling

#5468
From: Alan Litster
Date: Mon, 14 May 2001 14:55
24 lines
1538 bytes
Hello,
Below is some code that I used to use with MS VC6, does any one know how
you convert it to be used with BCB, specificaly the exception handler code.

inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);};

  ADODB::_ConnectionPtr pCnn = NULL;
  try
  {
    TESTHR(pCnn.CreateInstance(__uuidof(ADODB::Connection)));
  }

  catch(_com_error &e)
  {
    if(pCnn)
      PrintProviderError(pCnn);
    PrintComError(e);
 }

The _com_issue_error and the classes don't seem to exist under BCB, is there
an equivalent?

Thanks
Alan
Technical Details
Message-ID: <3afff2f5$0$15025$cc9e4d1f@news.dial.pipex.com>
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!lnewspeer00.lnd.ops.eu.uu.net!lnewspost00.lnd.ops.eu.uu.net!emea.uu.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,5c729f4239f0a085,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-05-14 08:00:12 PST
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!lnewspeer00.lnd.ops.eu.uu.net!lnewspost00.lnd.ops.eu.uu.net!emea.uu.net!not-for-mail
From: "Alan Litster" <alitster@indie.dabsol.co.uk>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO Exception handling
Date: Mon, 14 May 2001 15:55:53 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Lines: 27
Message-ID: <3afff2f5$0$15025$cc9e4d1f@news.dial.pipex.com>
NNTP-Posting-Host: userdw38.uk.uudial.com
X-Trace: 989852409 news.dial.pipex.com 15025 62.188.8.32
X-Complaints-To: abuse@uk.uu.net