Home » Developer & Programmer » Precompilers, OCI & OCCI » OCCI (oracle 9i)& Visual C++ 7 (createConnection -- An unhandled exception)
icon9.gif  OCCI (oracle 9i)& Visual C++ 7 (createConnection -- An unhandled exception) [message #126336] Sun, 03 July 2005 20:13 Go to next message
Don.Wind
Messages: 2
Registered: July 2005
Location: China
Junior Member
I am new to OCCI and am using VS.NET to access Oracle database. I am having problems with the createConnection call. When I execute the program I get the following error:
An unhandled exception at 0x6087e01e in oracleoccitest.exe: 0xC0000005:Access violation reading location 0xcc005248.

source code:

int _tmain(int argc, _TCHAR* argv[])
{
Environment *env = Environment::createEnvironment(Environment:DEFAULT);
try {
Connection *con =
env->createConnection("TESTUSER","TESTUSER","SERVERIP:1521/DBNAME"); /*Error!*/
env->terminateConnection(con);
} catch ( ... ) {
}
Environment::terminateEnvironment(env);
return 0;
}

project setting:
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MD /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /nologo /c /Wp64 /ZI /TP

oracle installation:
92010NT_Disk1.zip
OCCI Resources:
%ORACLE_HOME\oci\lib\msvc (no vc71 subdirectory)
%ORACLE_HOME\oci\include
%ORACLE_HOME\oci\samples
VS version:
vc++ 7.1.3091

Any one got a solution??!

Who can file a trouble ticket with Oracle and let me know what they find out?
Re: OCCI (oracle 9i)& Visual C++ 7 (createConnection -- An unhandled exception) [message #128420 is a reply to message #126336] Mon, 18 July 2005 07:51 Go to previous messageGo to next message
bLanark
Messages: 1
Registered: July 2005
Junior Member
Hi there. Did you resolve your problem?

I have the same problem, but only with our full application. When I take a small test case, there is no exception - very fustrating.

Any update would be gratefully received!


Alistair
Re: OCCI (oracle 9i)& Visual C++ 7 (createConnection -- An unhandled exception) [message #130169 is a reply to message #128420] Thu, 28 July 2005 09:23 Go to previous messageGo to next message
kmohan
Messages: 28
Registered: July 2005
Junior Member
OCCI 9iR2 is not supported with VC7.1. It is supported only with VC7.0.
OCCI 10g is supported with both VC7.0 and VC7.1.
See http://download-uk.oracle.com/docs/html/B10132_04/toc.htm#CACHEDDD
Re: OCCI (oracle 9i)& Visual C++ 7 (createConnection -- An unhandled exception) [message #130230 is a reply to message #130169] Thu, 28 July 2005 19:41 Go to previous message
Don.Wind
Messages: 2
Registered: July 2005
Location: China
Junior Member
Cool
thank you!

6.1.4 Support for Microsoft Visual C++ 7.1 .NET 2003
Applications developed in Microsoft Visual C++ 7.1 .NET 2003 should use oraocci10.lib and oraocci10.dll. The currently shipped OCCI DLL is built with Microsoft Visual C++ 6.0 and cannot be used from a Microsoft Visual C++ 7.1 .NET 2003 compiled application. This OCCI DLL links with the non-debug version of Microsoft CRT (MSVCR71.DLL). The installed location is ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\vc71.

6.1.5 Support for Debug Version of Microsoft Visual C++ 7.1 .NET 2003
Applications that are linked with MSVCR71D.DLL (debug version of Microsoft C-Runtime) in Microsoft Visual C++ 7.1 .NET 2003 in order to debug memory issues should link with oraocci10d.lib and oraocci10d.dll. The installed location is ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\vc71.



Previous Topic: Compatibility OCCI / ProC
Next Topic: Problems using OCCI ,get Date
Goto Forum:
  


Current Time: Fri Mar 29 08:43:17 CDT 2024