🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

SQL error code in ADO?

#2984
From: Emil Doychev
Date: Tue, 14 Jan 2003 10:35
19 lines
1815 bytes
Hello everybody,

I am using C++ Builder 5, SP1 but I think it should be the same for Delphi.

The application, which I develop, access MS SQL Server 7.0 with ADO
components.  It is very interesting for me how I can get the SQL error code
returned by the SQL Server in case of any error?

It is possible to try-catch the EDatabaseError exception or to use the
EDatabaseError parameter in OnPostError event in TADOTable, TADOQuery and
s.o., but there is no property available for the SQL error code returned by
the SQL Server.

I checked all posts in both ADO groups - for Delphi and C++ Builder and I
didn't saw even close problem. So, I think (hope) that the decision is very
simple and everybody knows it :-) just I am blind for it.

Thank you in advance.
Emil Doychev.
Technical Details
Message-ID: <3e23e7fa@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!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5cad,3ee6f95cdd2bfba2,start
X-Google-Attributes: gidf5cad,public
X-Google-Thread: 10698b,3ee6f95cdd2bfba2,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-14 02:39:56 PST
From: "Emil Doychev" <isyint@evrocom.net>
Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado
Subject: SQL error code in ADO?
Date: Tue, 14 Jan 2003 12:35:34 +0200
Lines: 21
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.116.135.53
Message-ID: <3e23e7fa@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1042540538 212.116.135.53 (14 Jan 2003 02:35:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail