Article View: borland.public.interbase.sql
Article #944Re: WHEN DO Statement
From: Martijn Tonies
Date: Tue, 20 Mar 2007 18:37
Date: Tue, 20 Mar 2007 18:37
36 lines
2370 bytes
2370 bytes
> Does anyone know if the WHEN DO statement actually works for SQLCODE, > Exceptions and GDSCode errors, as documented. All examples in the > documentation show SQLCODE being used, as is most common. But in > trying to use Exceptions, and especially GDSCODE, I get errors that > seem to indicate those options don't work. I have tried with quotes and > without, using the code and the number for GDSCODES. The > documentation, again, isn't too specific. In fact, in the Language > guide (pg 3-18) the When Do syntax indicates "GDSCODE errcode". The > following table provides a "Description" of GDSCODE errorcode as "An > InterBase error code number". Table 6.5 list columns for "Error code" > and "Number". BTW the Number ends in a Letter. So, not quite sure > what needs to be entered into sql code, but I think I have tried > everything. > The following section in the Language guide (pg3-20) "Handling > Interbase error codes" says a "... procedure might receive an InterBase > error code, isc_lock_conflict." Then provides an example showing When > SQLCODE! > Does anyone know if this statement works? Patrick, try: when gdscode lock_conflict do It's the normal isc_ code, without the isc_ part. -- Martijn Tonies Database Workbench - the IBConsole alternative! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com
Technical Details
Message-ID:
<460029e9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45fec3cb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,9d0db194da8efd84 X-Google-Attributes: gid114a0e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Martijn Tonies" <m.tonies@upscene.removethis.com> Newsgroups: borland.public.interbase.sql References: <45fec3cb$1@newsgroups.borland.com> Subject: Re: WHEN DO Statement Date: Tue, 20 Mar 2007 19:37:50 +0100 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 NNTP-Posting-Host: 212.238.159.172 Message-ID: <460029e9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1174415849 212.238.159.172 (20 Mar 2007 11:37:29 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail