Re: OCI Environment::CreateEnvironment SQLException
From: <jaythinker_at_gmail.com>
Date: 24 May 2006 13:09:12 -0700
Message-ID: <1148501352.031420.3910_at_j55g2000cwa.googlegroups.com>
Date: 24 May 2006 13:09:12 -0700
Message-ID: <1148501352.031420.3910_at_j55g2000cwa.googlegroups.com>
Hi,
What VS version are you using? I have VS7 and I got OCCI working as:
- Download the following from Oracle site:
instantclient-sdk-win32-10.2.0.1-20050930.zip instantclient-basic-win32-10.2.0.1-20050930.zip
- Create empty Win32 Console Project.
- Create folder myproject\src in the new project directory.
- Create myproject\src\include and myproject\src\lib
- Unzip the sdk and basic client files and copy: -- all *.h files ftrom instantclient_10_2\sdk\include to myproject\src\include -- copy two libraries oci.lib and oraocci10.lib from \instantclient_10_2 to myproject\src\lib
- Put your myproject.cpp into \myproject\src
- In the VS7 UI:
- Project Properties -> C/C++ -> General -> Additional Include Directories -> add ...\myproject\src\include
- Project Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions -> add WIN32COMMON;_DLL;_MT to the existing value
- Project Properties -> Linker -> General ->Additional Library Directories -> add ...\myproject\src\lib
- Project Properties -> Linker -> Input -> Additional Dependencies -> add: oci.lib msvcrt.lib msvcprt.lib oraocci10.lib
- Project Properties -> Linker -> Input -> Ignore All Default Libraries -> change it to Yes(/NODEFAULTLIB)
- Copy instantclient_10_2\oci.dll and instantclient_10_2\oraocci10.dll from the unzipped basic client directory to \myproject\Debug
Julia
paul.flew_at_globaladdress.net wrote:
> Hi
>
> Apologies if this is a dumb question, but I'm new to Oracle, and I'm
> trying to use the demo code with Instant Client 10.2 downloaded from
> Oracle's website.
>
> The code compiles OK, but throws a SQLException on the first statement:
>
> env = Environment::createEnvironment (Environment::DEFAULT);
>
> There's no error message, just a code of 32104.
>
> My environment is Windows NT with Visual Studio .Net.
>
> Thanks in advance for any help,
>
>
>
>
> Paul
Received on Wed May 24 2006 - 22:09:12 CEST