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