Re: C++ connection to Oracle

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Mon, 05 Feb 2001 19:03:16 GMT
Message-ID: <95mtdc$a70$1_at_nnrp1.deja.com>


In article <95mpbf$dfg$1_at_news.panix.com>,   "Thelonious Georgia" <keepberthasurfin_at_hotmail.com> wrote:
> Hey all-
>
> I am trying to create a C++ application that will talk to an Oracle
> database. I am slightly confused, however, whether I should be
 looking at
> the Oracle Pro*C/C++ Precompiler or the OCI documentation. At this
 point,
> I'm trying to write just the conduit piece for connectivity, I
 initially
> want to be able to feed the sql in manually for testing purposes.
>
> I'm using VC6 on NT, but I'd like to keep it platform neutral. I'll
 use MFC
> if that's the way to go, however.
>
> Thanks,
>
> Theo
>
>

Theo:

You want to read the proC manual. OCI is another C format. It does not require the proC precompiler and has IMHO noiser funciton calls.

For the vc6 environment, you have to teach microsoft to precompiler the .pc files into either .cpp or .c files. It is done under settings for a particular file. I cannot recall how to setup a universal solution that would be applied to all .pc files. I generally do not use the precompiled headers during compiles of the proC files.

Since the output of the .pc file is a .cpp or .c file, you must also include the output file in your list of source files. This will cause it to be added to the final set of objects in your executable.

You also have to add the Oracle executables, includes, and library path to the executables, includes, and libararies paths under Tools->Options-
>directories. And not the least, add the Oracle library to the link
line for the project.

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Mon Feb 05 2001 - 20:03:16 CET

Original text of this message