Hi all,
I would like to read each record from a ORACLE database using SQL and output each of the records into different output files. How do I do this in C program???
You need to use Oracle ProC which comes with Oracle (well, it does with ours, but I don't do the purchasing!) Oracle ProC is a massive product which allows full integration of Oracle a 'C' and is far too detailed to be dealt with here.
Alternatively....
You could use system calls to run SQL in a shell. This leaves the problem of accessing the output of the commands. See a recent thread about running DOS commands within 'C' for more on this.
You could also use ORACLE's OCI (Oracle's Call Interface). This is an API into Oracle. This library provides a set of routines to execute SQL Statements and retrive the result sets. The ProC pre-processor generates calls to these routines.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.