Re: Pro*C and OCI

From: Carel-Jan Engel <cj.engel_at_ease.nl>
Date: 1995/10/31
Message-ID: <DHBz2x.35p_at_wirehub.nl>#1/1


Harvey Kim <75533.1104_at_CompuServe.COM> wrote:

>Could somebody tell me what the advantage of using Pro*C
>pre-processor is as oppose to making direct OCI calls to develop
>software using Oracle. Why would I want to go through another
>step of pre-processing a file and trying to debug a generated
>code? I realize that the ideal is to write "portable" embedded
>sql code so that the code one writes become easily portable to
>another DBMS vendor but how true is this? Is it worth a hassle?
>Isn't there a lot of work in porting softwares from one DBMS to
>another no matter what method you're using to write your software?
>Any comments would be appreciated...

In my opinion the chance that something has to be changed in your code porting everything to another platform is greater using OCI rather than Proc*C. Other pro's of Pro*C is that the chance having to change the code after a new release of some of the supporting products is smaller; the preprocessor checks some of the SQL syntax and so on. I've worked with HLI (host Language Interface, mid 80's), Proc*C and OCI. I prefer Pro*C. We did big projects (over 100K lines of code) withPro*C. We generated lots of the code by SQL scripts. I haven't seen problems that could not be soved with Pro*C, but could be solved with OCI (This doesn't mean taht they don't exist). The only porting experience a have is converting embedded SQL-based code from Ingres to Oracle. That wasn't a very big job.
We often changed the ordering of pre-compiling - compiling into preprocessing (by the C-compiler) - pre-compiling - compiling. With some advanced make-scripts the total process is'nt too big a problem.

I hope this is somewat an answer to you, and likes to hear the choice you made,

Carel-Jan Engel            email: careljan_at_ease.nl 
                           phone:   +31 182 613460 
Take it Ease!              fax:     +31 182 613570 
Ease - Engel Automation & Software Engineering B.V.  Professional Software with Oracle, 'C' and Unix Received on Tue Oct 31 1995 - 00:00:00 CET

Original text of this message