Re: Pro*C : Using WHENEVER SQLERROR........

From: L. Scott Johnson <lscott_at_crl.com>
Date: 27 Apr 1994 17:33:49 -0700
Message-ID: <2pn09d$5iu_at_crl2.crl.com>


In article <2pm7v2$6ov_at_news.u.washington.edu>, Rajasekhar Atteri <shakes_at_u.washington.edu> wrote:
>Hi,
>
> The Pro*C Precompilers Guide (Page 2-7) says that the statement
>
>EXEC SQL WHENEVER SQLERROR DO function();
>
>should physically precede all SQL statements to be tested.
>
>What does this mean if I am performing separate compilations and then linking?
>
>Should I include this statement in each file?
>If so, should I include a dummy function at the top of
>each file with this statement even though it never gets called?
>

Yes, include it at the top of every source module. No, you don't need a dummy function.
It can be alone, say, after the #include statements; it's only a Proc*C compiler directive, not an executable statement, which is why you have to include it in every source file to begin with.

L. Scott Johnson
Senior Programmer
Research Planning, Inc.
(803) 256-7322 Received on Thu Apr 28 1994 - 02:33:49 CEST

Original text of this message