Click here to Skip to main content
15,077,377 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi everybody,

I've created a simple program on ASP.NET to connect to oracle 10g with this connection string:

provider=MSDAORA;data source=ORCL;user id=SCOTT;password=TIGER


It ran successfully on win7 32bits. But when i move it to win7 64bits, it can't connect to oracle. The following error showed up:

ORA-06413: Connection not open.


My connection code is:
OleDbConnection conn = new OleDbConnection(oracleConnStr);
conn.Open();//The error showed up here...


How to solve this? Currently, i use oracle 10g 32bits on Windows 7 64bits. Do i have to change to oracle 11g?


----------------------------------------------------------------------------------------



I've created a window form application and use that connection string with building target is x86 and it ran successfully. But ASP.NET project with target is x86 still show up that error!
Posted
Updated 18-May-11 3:54am
v24

I have had the same problem before, In my case it worked to build the project as 32 bits application instead of 64 bits. the 32 bits OCI dll from Oracle does not like to be addressed from a 64-bits app. You can change this in the buildsettings of your project (target platform).
   
Comments
thanhvinh0906 18-May-11 1:06am
   
I've changed target to x86, but still throw that error
thanhvinh0906 18-May-11 4:42am
   
I've create a window form application and use that connection string with building target is x86 and it ran successfully. But ASP.NET project with target is x86 still show up that error!
have you checked the environment variables for ORACLE_HOME and Path variable?
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900