Re: Programming with OCI is painful.

From: Mr Petr Smilauer <ucfapsm_at_ucl.ac.uk>
Date: 17 Feb 93 10:54:08 GMT
Message-ID: <1993Feb17.105408.19076_at_ucl.ac.uk>


Actually, it seems to me that the article's author had to spent more time in preparing this complaint than it would have to prepare the include file. Really, it took about 10 minutes to browse through the OCI manual pages, especially if you prepare some typedef-s. But be forewarned, you *cannot* do complete prototyping either, for example: int odefin( PCURSOR *pc, int iPos,  void *pvBuffer [...etc]) -> here the buffer cannot be typed better than as pointer to void, as this is general data pointer. But this is inevitable.  Also painfull is to use values for not used parameters, even if you define something like: #define NOT_USED_NUM (int )(-1)

        #define NOT_USED_PTR (void *)(-1) Good idea, if you work with C++ (as I do: hence prototyping was obligatory for me) is to use inline functions throwing away typing of NOT_USED_xxx from your code. THis way, you could also add some trivial checking on parameter values, if you wish.

Hope this helps
 P. Smilauer <ucfapsm_at_uk.ac.ucl> Received on Wed Feb 17 1993 - 11:54:08 CET

Original text of this message