I tried the same code and it works ok, so I don't see anything wrong with how you are coding it. However, you might want to explicitly specify Public in front of New, but I'm not sure if this makes a difference.
Paul
I am trying to connect to an Oracle database from a Windows App created with VB.Net. I am using System.Data.OracleClient. At connection.Open(), an exception is thrown that says, "System.Exception: Could not create an environment: OCIEnvCreate returned -1." What does this mean and...
I finally figured this one out. The problem was with the permissions of the asp.net user, it was not able to access the tnsnames.ora file.
The location of the tnsnames.ora file is specified in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, the TNS_ADMIN key points to it. The asp.net...
I am using the following code in both a windows app and an ASP.Net app:
Private m_cmd As System.Data.OleDb.OleDbCommand
Private m_con As System.Data.OleDb.OleDbConnection
dim connectionString as String
connectionString = "Provider=MSDAORA.1;User ID=myId;Data Source=PRD1;"
Try...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.