Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: C, CGI, and Oracle
There are two different way's to do what you want. You can use the Pro*C
precompiler, or Oracles OCI (Oracle Call Interface). Pro*C is much easier
to use, but makes debugging a nightmare, as it renders most debuggers usless.
OCI is much more complicated, but is easier to debug, because it is just a
set of function calls into a library.
You can get the documentation for either of these from Oracle, or look on the documentation CD that is shipped with your Oracle Server software.
There is also an excellent book on the subject (yes it covers all of the important stuff) called: "Oracle developer's guide the C programmer's Guide to Oracle Database Development" written by David McClanahan, published by Oracle Press. It is currently out of print, but amazon.com is really good at tracking down copies of out of print books, and should have no problem finding you a copy.
Good luck-
Todd Marshall
2001 6th Ave Suite 400 (ph) 206-443-0651 Seattle, WA (fx) 206-443-0718
>
> Our underlying data is moving from well-behaved indexed files on VMS to an
> Oracle database. I have a number of CGI programs written in C that access
the
> current data. I was careful to separate the I/O interface, knowing that the
> switch to Oracle was coming.
>
> Now I need to replace that part of the programs with C code that connects to
> the Oracle database, sends SQL, reads results if necessary, and disconnects.
> I found a book that claims to contain all you need to know about CGI and
> Oracle, but the author left out the most critical part -- how you actually
> write the code to access the Oracle database! The database may be on the
> same system or a remote system. I also need to know which parts of Oracle
> that I need to do this. The CGI system is Sun Solaris with an Apache
server.
>
> If anyone has actually interfaced C to Oracle, please let me know. Some
> example programs would be good also. I've been having a very hard time
> finding any definitive information on how to do this.
>
> Help! Thank you!
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Apr 09 1998 - 18:42:11 CDT