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

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
 
S

sdbillsfan

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?
 
S

scott

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
 
S

scott

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
 
S

scott

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.
 

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