Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I resolve the error ORA-06413: Connection not open?

My local environment VS2012

Using Oracle 10g XE

Dim dbConn As New OleDbConnection

Dim dbComm As OleDbCommand

dbConn.ConnectionString = "Provider=msdaora;Data Source=XE;User ID=scott;Password=tiger"

dbConn.Open()

Tip error: ORA-06413: Connection not open.

Already check the TNSNAMES.ora, SQLNET.ora, LISTENER.ora and its nothing wrong.

But why this error appear? :(

like image 261
Mohd Syafiq Sulaiman Avatar asked Nov 08 '25 06:11

Mohd Syafiq Sulaiman


2 Answers

The error is caused by the parenthesis in the pathname.

possibly you execute VS2012 from C:\program file (x86)...

workaround: create a junction link

steps:

  1. from: command line execute

    C:>mkLink /j "Program Files x86" "Program Files (x86)"
    

    and then

  2. fix the (or create a new) shortcut with new path (C:\program file x86...)

like image 61
Pablo Fébolo Avatar answered Nov 09 '25 20:11

Pablo Fébolo


I worked a lot on this problem, I lost a lot of time. Apparently IIS Express in Visual Studio uses the Oracle provider 64 bit.

To solve this problem:

  1. I installed IIS on my PC (Windows 10) with .NET 4.5 or higher

  2. I compiled the Web API application with 32-bit target.

  3. I publish the web application on my IIS.

  4. On IIS I set enable the apps 32 bit to true

like image 31
Mostafa Ait Baallal Avatar answered Nov 09 '25 21:11

Mostafa Ait Baallal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!