Oracle Connection Error

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Dim oOracleConn As OracleConnection = New OracleConnection
()
oOracleConn.ConnectionString = "Data
Source=FTEST920;uid=master_schedule;pwd=dragons1;"
oOracleConn.Open()

This is an ASP.Net application and the build goes fine
with no errors, but when I try to run from the development
environment I get the following. I am using Visual Studio
2002 with 1.1 framework.

System.Exception: Could not create an environment:
OCIEnvCreate returned -1.

Any help would be appreciated.

Thanks
Jack
 
Hi

Try the following connection string:
Standard:
"Data Source=Oracle8i;Integrated Security=yes";

This one works only with Oracle 8i release 3 or later
Declare the OracleConnection:

C#:
using System.Data.OracleClient;
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "my connectionstring";
oOracleConn.Open();

VB.NET:
Imports System.Data.OracleClient
Dim oOracleConn As OracleConnection = New OracleConnection
()
oOracleConn.ConnectionString = "my connectionstring"
oOracleConn.Open()



HTH
Ravikanth[MVP]
 
Jack:

It could be a permissions problem. Did you grant the account at least read
access to the ORACLE_HOME directory?
 
Back
Top