S
Serge Poirier
Good Day Folks,
I'm trying the Oracle Data Provider, the one written by
Microsoft, without success thus far.
The code and error message are listed below.
Any ideas ?
Thanks in advance.
------------------
Code
<%@Page Language = "VB"
CompilerOptions='/R:"c:\windows\microsoft.net\framework\v1.
1.4322\system.data.oracleclient.dll"' Debug="true"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OracleClient" %>
<html>
<head>
<title></title>
</head>
<body>
<%
dim rcDB as OracleConnection
dim theSQL as string,connstring as string
dim oracleDSN as string, p_userid as string, p_password as
string
oracleDSN="WEB"
p_userid="x13923"
p_password="teacher"
connstring="Data Source=" & oracleDSN & ";User ID=" &
p_userid & ";Password=" & p_password & ";Enlist=False"
theSQL="select stud_id,stud_name FROM WEB_STUDENT_HEADER"
rcDB =New OracleConnection(connstring)
rcDB.open()
Dim myCommand As New OracleCommand(theSQL , rcDB)
dim dataset as OracleDataReader= myCommand.ExecuteReader
()
do while dataSet.read() %>
<%= dataSet("stud_id") & " / " & dataSet("stud_name")
& "<br />" %>
<% loop
myCommand.dispose
rcDB.close
rcDB.dispose
%>
Done !
</body>
</html>
---------------------
Error Message
Exception Details:
System.Data.OracleClient.OracleException: ORA-02041:
client database did not begin a transaction
Source Error:
Line 31: Dim myCommand As New OracleCommand(theSQL , rcDB)
Line 32:
Line 33: dim dataset as OracleDataReader=
myCommand.ExecuteReader()
Line 34:
Line 35: do while dataSet.read() %>
Source File: c:\inetpub\wwwroot\odpselectmicrosoft.aspx
Line: 33
Stack Trace:
[OracleException: ORA-02041: client database did not begin
a transaction
]
System.Data.OracleClient.OracleConnection.CheckError
(OciHandle errorHandle, Int32 rc) +80
System.Data.OracleClient.OracleCommand.Execute
(OciHandle statementHandle, CommandBehavior behavior,
Boolean isReader, Boolean needRowid, OciHandle&
rowidDescriptor, ArrayList& refCursorParameterOrdinals)
+1919
System.Data.OracleClient.OracleCommand.Execute
(OciHandle statementHandle, CommandBehavior behavior,
ArrayList& refCursorParameterOrdinals) +28
System.Data.OracleClient.OracleCommand.ExecuteReader
(CommandBehavior behavior) +272
System.Data.OracleClient.OracleCommand.ExecuteReader()
+7
ASP.odpselectMicrosoft_aspx.__Render__control1
(HtmlTextWriter __output, Control parameterContainer) in
c:\inetpub\wwwroot\odpselectmicrosoft.aspx:33
System.Web.UI.Control.RenderChildren(HtmlTextWriter
writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter
writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929
I'm trying the Oracle Data Provider, the one written by
Microsoft, without success thus far.
The code and error message are listed below.
Any ideas ?
Thanks in advance.
------------------
Code
<%@Page Language = "VB"
CompilerOptions='/R:"c:\windows\microsoft.net\framework\v1.
1.4322\system.data.oracleclient.dll"' Debug="true"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OracleClient" %>
<html>
<head>
<title></title>
</head>
<body>
<%
dim rcDB as OracleConnection
dim theSQL as string,connstring as string
dim oracleDSN as string, p_userid as string, p_password as
string
oracleDSN="WEB"
p_userid="x13923"
p_password="teacher"
connstring="Data Source=" & oracleDSN & ";User ID=" &
p_userid & ";Password=" & p_password & ";Enlist=False"
theSQL="select stud_id,stud_name FROM WEB_STUDENT_HEADER"
rcDB =New OracleConnection(connstring)
rcDB.open()
Dim myCommand As New OracleCommand(theSQL , rcDB)
dim dataset as OracleDataReader= myCommand.ExecuteReader
()
do while dataSet.read() %>
<%= dataSet("stud_id") & " / " & dataSet("stud_name")
& "<br />" %>
<% loop
myCommand.dispose
rcDB.close
rcDB.dispose
%>
Done !
</body>
</html>
---------------------
Error Message
Exception Details:
System.Data.OracleClient.OracleException: ORA-02041:
client database did not begin a transaction
Source Error:
Line 31: Dim myCommand As New OracleCommand(theSQL , rcDB)
Line 32:
Line 33: dim dataset as OracleDataReader=
myCommand.ExecuteReader()
Line 34:
Line 35: do while dataSet.read() %>
Source File: c:\inetpub\wwwroot\odpselectmicrosoft.aspx
Line: 33
Stack Trace:
[OracleException: ORA-02041: client database did not begin
a transaction
]
System.Data.OracleClient.OracleConnection.CheckError
(OciHandle errorHandle, Int32 rc) +80
System.Data.OracleClient.OracleCommand.Execute
(OciHandle statementHandle, CommandBehavior behavior,
Boolean isReader, Boolean needRowid, OciHandle&
rowidDescriptor, ArrayList& refCursorParameterOrdinals)
+1919
System.Data.OracleClient.OracleCommand.Execute
(OciHandle statementHandle, CommandBehavior behavior,
ArrayList& refCursorParameterOrdinals) +28
System.Data.OracleClient.OracleCommand.ExecuteReader
(CommandBehavior behavior) +272
System.Data.OracleClient.OracleCommand.ExecuteReader()
+7
ASP.odpselectMicrosoft_aspx.__Render__control1
(HtmlTextWriter __output, Control parameterContainer) in
c:\inetpub\wwwroot\odpselectmicrosoft.aspx:33
System.Web.UI.Control.RenderChildren(HtmlTextWriter
writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter
writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929