Article View: borland.public.cppbuilder.database.ado
Article #3192Re: Reading the error object in function ADOExecuteComplete(...)
From: INCA Hellas Ltd
Date: Tue, 03 Dec 2002 19:25
Date: Tue, 03 Dec 2002 19:25
56 lines
2489 bytes
2489 bytes
I had the same problem (by the way it shouldn't happen) and in order to do
something similar I did these:
void ShowADOErrors(TADOConnection* cn)
{
AnsiString err;
int i,c=0;
_di_Errors ep;
_di_Error epi;
if (!cn) return;
cn->ConnectionObject->Get_Errors(ep);
ep->Get_Count(c);
for (i=0;i<c;i++) {
int n=0;
WideString desc;
if (SUCCEEDED(ep->Get_Item(i,epi))) {
epi->Get_Number(n);
epi->Get_Description(desc);
err+=AnsiString(n)+". "+desc+"\n";
epi.Release();
}
}
ep->Clear();
ep.Release();
if (!err.IsEmpty())
Application->MessageBox(err.c_str(),"ADO
Error",MB_OK|MB_ICONERROR|MB_SERVICE_NOTIFICATION);
return;
}
K.Tragas
ktragas@incahellas.com
"Martin Klopp Jensen" <klopp@mail.dk> wrote in message
news:3dec70ae@newsgroups.borland.com...
> Hi all,
> i have a problem finding out why my execution fails.
> In the function, ADOExecuteComplete, there is a parameter const Error
*Error
> but i can't access it.
> I get this error:
> [Linker Error] Unresolved external 'System::___linkproc__ __fastcall
> CheckAutoResult()' referenced from C:\PROGRAM
> FILES\BORLAND\...\RELEASE\VCLE.LIB|syssupp
> when trying to call Error->Description...
>
> Anybody have any experience with this?
> Should i got about it in another way?
>
> Cheers, Martin
>
>
Technical Details
Message-ID:
<3ded0530@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!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.esat.net!lnewspeer01.lnd.ops.eu.uu.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3dec70ae@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,681c92bec0c72a61 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-12-03 11:39:55 PST From: "INCA Hellas Ltd" <inca@incahellas.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3dec70ae@newsgroups.borland.com> Subject: Re: Reading the error object in function ADOExecuteComplete(...) Date: Tue, 3 Dec 2002 21:25:32 +0200 Lines: 58 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 212.251.11.187 Message-ID: <3ded0530@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038943536 212.251.11.187 (3 Dec 2002 11:25:36 -0800) 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!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.esat.net!lnewspeer01.lnd.ops.eu.uu.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail