Example C programs using OCI please

From: Paul Ryan <ryanpa_at_cs.aston.ac.uk>
Date: Sat, 20 Nov 1993 15:49:33 GMT
Message-ID: <CGsryL.C3q_at_aston.ac.uk>


Hello,

I am trying to write an XView front-end for run-time Oracle queries using the Oracle Call Interface (OCI).

I have done this sort of thing before on IBM platforms but it seems to be a lot more messy with Oracle.
As yet, I haven't figured out exactly how to use the OCI.

I've got the rather misleadingly titled "Pro*C User's Guide" which is actually the Pro*C and OCI user guide. It has a good section describing all the steps but is rather economical with examples.

What I would really like to see is a little C program which just opens the database connection, executes a simple query, eg. 'SELECT * FROM DUMMY_TABLE', then closes the connection leaving the contents of DUMMY_TABLE in some program variables (presumably an array of arrays or something) so that I can printf it on the screen.

(I know this sort of static embedded SQL is supposed to be done with Pro*C - I'm just looking for a simple example to get me going.)

If anyone could point me in the right direction then I would be eternally greatful - I'm having enough trouble with the XView stuff as it is; I thought the Oracle side would be easy !

Please email me if you can help

Thanks,
Paul Ryan

---
Aston University
Birmingham, UK
Received on Sat Nov 20 1993 - 16:49:33 CET

Original text of this message