The isql script drops the procedure (which should fail as it doesn't exist), creates it, uses it, drops it, then exits.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Steinmaurer Sent: Friday, March 08, 2013 11:08 AM To: [email protected] Subject: Re: [firebird-support] Catching exception fails under isql > Does anyone have any insight in to this? > > Running this statement in isql: > > EXECUTE PROCEDURE P_IMPORT; > > Yields this error: > > Statement failed, SQLCODE = -508 > no current record for fetch operation > -violation of PRIMARY or UNIQUE KEY constraint > > Yet running the same statement in Database Workbench yields no error. > The procedure is written to ignore unique_key_violation: > > FOR SELECT > COL1, COL2 , ... > FROM > P_SELECT > INTO > :COL1, :COL2, ... > DO BEGIN > > INSERT INTO > THE_TABLE ( > COL1, COL2, ... > ) > VALUES ( > :COL1, :COL2, ... > ); > > WHEN GDSCODE unique_key_violation DO COL_1=NULL; Are you sure that isql sees the most recent version of the SP, in case you are developing/changing the SP in DBW? Thomas ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links
