Re: Programming with OCI is painful.

From: <roeber_at_vxcrna.cern.ch>
Date: Fri, 12 Feb 1993 09:37:21 GMT
Message-ID: <1993Feb12.103721.1_at_vxcrna.cern.ch>


In article <1993Feb11.224723.29643_at_clarify.com>, frank_at_clarify.com (Frank H. Lai) writes:
> [...] For a strict
> type checking, we need prototypes for the OCI routines. IT'S
> NOT THERE. [...]
> BTW, if you don't agree with and have a better idea on this
> problem. Let me know.(My solution is do reverse-engineering these
> prototypes from the manual)

I agree it's annoying, but I didn't find it a major problem -- one of the first things I did was write a library of wrapper routines anyway, to 1) parametrize things a bit better for C (i.e., get rid of all those parameters never used in C), and 2) tie into our standard error-handling system. When I go do the Oracle 7 wrappers one of these days, I'll probably throw in mutex protection for multi-threaded apps. Of course, I did provide my own header file, with full prototypes, etc.

The thing that I worry about are the structures (PGA and SGA (I think -- this was last year)). They do not have natural alignment, so changes in compiler versions (or even compiler settings -- e.g., -O vs. -g) might change how things are padded. Maybe not, but there's no guarantee!

-- 
Frederick G. M. Roeber | CERN -- European Center for Nuclear Research
e-mail: roeber_at_cern.ch or roeber_at_caltech.edu | work: +41 22 767 31 80
r-mail: CERN/PPE, 1211 Geneva 23, Switzerland | home: +33 50 20 82 99
--  
"Sorry, baby, I can't take you to the pizza joint tonight, I've got to go
back to the lab and split the atom."  -- Ayn Rand, "What is Romanticism?"
Received on Fri Feb 12 1993 - 10:37:21 CET

Original text of this message