Re: Pro*C - mixing SQL and PL/SQL in the module

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Wed, 08 Dec 1999 09:34:58 -0500
Message-ID: <384E6C92.645A72BF_at_Unforgettable.com>


Clint Eastwood wrote:
>
> HiYa
>
> I think that this isn't possible .. is that right? it seems that from
> the manual, that I have to set SQLCHECK to either SEMANTICS or SYNTAX ,
> and that means that I can't have both ... is that right?
>
> the reason that I wanted to use both is that I want to be able to
> declare cursors, and use for loops, and I don't think that this is as
> easy without PL/SQL.
>
> However, on other occasions I want to do things that are just as easily
> done with SQL ... any suggestions as to the benefits of either paradigm
> are appreciated, as I am feeling a little confused as to the best
> approach
>
> thanks

Except for using native data types and built-in packages there really isn't any particular advantage to using pl/sql within pro-c because anything that you can do in pl/sql you can do in pro-c. It may take more code, but ultimately you'll have better control because you won't have to deal with exceptions and passing parameters to the pl/sql blocks as well as returning values.

Nevertheless, it is a fairly simple matter to have pl/sql blocks in pro-c [Quoted] code. The SQLCHECK parameter represents different levels of checking with the lowest being NONE and the highest being FULL and each level encompassed the checks of the lower levels. Therefore, if you have sqlcheck=semantics you also get the effect of sqlcheck=syntax. Received on Wed Dec 08 1999 - 15:34:58 CET

Original text of this message