Oracle Connection Error

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
 
R

Ravikanth[MVP]

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]
 
E

Elliot M. Rodriguez

Jack:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top