How to retrieve SQL error code from the Error object?

From: Konstantin Knyazev (kknyazev_no_spam__at_mail.ru)
Date: 03/21/05


Date: Mon, 21 Mar 2005 12:12:07 +0300

Hello!

I'm using MS SQL 2000 as a server and Delphi 7 over ADO as a client. On the
server side i have created stored procedure that can raise an error with
some SQL error code like 547 or 550 and i want to catch this code on the
client side to log and to call other procedure, but Error object does not
pass this code, there are only OLE DB error code (same for different errors)
and Description, but NativeError and SQLState fields is empty. How can i
recieve SQL error code over Error object? Thanks!

Best regards, Konstantin Knyazev



Relevant Pages

  • Re: Value in output parameter not accessable
    ... > terminate with an error code indicating validation failure (or set up ... > output parameters to return an error code and error message you can ... >>Public Shared Function PostItem(ByVal Subject As String, ... >>I've checked the stored procedure in query analyser and the return value is ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: WMI Namespace error
    ... Systems Management Server Group (MSFT) ... > The error code is 80041002" ... > reinstall the client. ...
    (microsoft.public.sms.setup)
  • Re: RPC SDK Samples Error
    ... This posting is provided "AS IS" with no warranties, ... Error code is 5. ... The modified sample client and server work fine on the same computer, ...
    (microsoft.public.win32.programmer.networks)
  • Re: error code is 80004005 and error code 1603
    ... your computers can not install SMS Advanced client due to error codes ... You want to know how to resolve this. ... computers, all of them with win 2000, I just can't install SMS Advanced ... Installation failed with error code 1603 ...
    (microsoft.public.sms.admin)
  • VSS Problem, Really confused and have no idea why it happens always
    ... Backup/Archive Client and Server. ... error code: ...
    (microsoft.public.windows.server.sbs)