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

  • Thread starter Thread starter scott
  • Start date Start date
S

scott

Hi,

I encounter the following error

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

when i try to run a simple program of ASP.Net (databinding example)
that connects to an oracle database.

I have included the program:
-----------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
'Dim strconn As String = "server=oracle;uid=system;pwd
=system;database =oracle"
Dim strconn As OracleConnection = New
OracleConnection("user id = scott;password = scott;data source =
ORACLE")
Dim strcomm As String = "select * from emp"
Dim dataadapt As New OracleDataAdapter(strcomm, strconn)
Dim ds As New DataSet
dataadapt.Fill(ds, "emp")
Dim bldr As New OracleCommandBuilder(dataadapt)
Dim dt As DataTable = ds.Tables(0)
dtemp.DataSource = dt
dtemp.DataBind()
End If
End Sub
 
Do you have the oracle client installed on this machine and if so, do
you have the proper permissions enabled on the oracle bin directory
containing the client dll?
 
I have installed oracle 9i client and also have checked the security
permissions to the bin directory.

Kindly let me know where the problem lies.

Thanks
 
I have installed oracle 9i client and also have checked the security
permissions to the bin directory.

Kindly let me know where the problem lies.

Thanks
 
Hi,

Thanks. I finally was able to figure it out. It was the permissions on
the parent folder that interfered with the child folder and hence the
connection could not be possible.

Thanks once again.
 
Back
Top