Re: Programming with OCI is painful.

From: Darrell Merrick <enterprise.rdd.lmsc.lockheed.com>
Date: Fri, 12 Feb 93 22:36:25 GMT
Message-ID: <1993Feb12.223625.2463_at_enterprise.rdd.lmsc.lockheed.com>


In article <1993Feb11.224723.29643_at_clarify.com>, frank_at_clarify.com (Frank H. Lai) writes:
>

> We do the OCI programming on three popular platforms,
> SUN, PC and MAC. ... we need prototypes for the OCI routines.

First of all, I do agree that programming with the OCI is painful. But I don't know what you mean about the prototypes. I'm using OCI on the mac and the oci.h file seems to have all the prototypes.

For example, this is in there:

int odefin( csrdef *cursor, int pos, unsigned char *buf,

                   int bufl, int ftype, int scale, short *indp,
                   char *fmt, int fmtl, int fmtt, unsigned short *rl,
                   unsigned short *rc );

Unless I'm missing some nuance of your complaint.

If you're working in C++ I would recommend creating an OCI class to encapsulate the grungy details of using the OCI. Its especially handy to have a "GetValue" function that just takes a query string as input and returns a value, when you just want to get one value (such as a count or a string). This can of course be overloaded for the various data types that you want returned.

-Darrell Merrick
 Lockheed Artificial Intelligence Center  merrick_at_titan.rdd.lmsc.lockheed.com   Received on Fri Feb 12 1993 - 23:36:25 CET

Original text of this message