Hello All,
I'm not sure if I'm posting this to the right area, so let me know if I should post it elsewhere.
I'm having an issue calling PL/SQL stored procedures in ASP.NET 2.0 using ODP.NET (Oracle.DataAccess assembly version 9.2.0.700). Many times the web page freezes during processing and I have to close the browser and try again. During debugging, I found that the freezing happens on the ExecuteNonQuery line of a stored procedure call. This behaviour is unpredictable as sometimes it works and sometimes it freezes, even WHEN using the same parameters. This happens when I try to run the web site hosted on the web server (Win2K3 web edition, IIS6) and also when I run the web site from my desktop using ASP.NET Development Server.
The stored procedures are quite complex and return an XML document in an XMLType output parameter. When the stored procedures return without freezing the web page, they are fairly quick. During a previous phase to this project, the same PL/SQL techniques were used to return a CLOB from a PL/SQL function to classic ASP pages and they executed flawlessly (and still do). I've seen the freezing happen on a PL/SQL function that was unchanged from the previous phase of the project. The PL/SQL functions and procedures reside in packages (in most cases, it's the same package).
Here's a typical stored procedure call (I stripped down exception handling for simplicity's sake. No exception is thrown when it freezes):
Any ideas?
Thanks in advance,
Mike
I'm not sure if I'm posting this to the right area, so let me know if I should post it elsewhere.
I'm having an issue calling PL/SQL stored procedures in ASP.NET 2.0 using ODP.NET (Oracle.DataAccess assembly version 9.2.0.700). Many times the web page freezes during processing and I have to close the browser and try again. During debugging, I found that the freezing happens on the ExecuteNonQuery line of a stored procedure call. This behaviour is unpredictable as sometimes it works and sometimes it freezes, even WHEN using the same parameters. This happens when I try to run the web site hosted on the web server (Win2K3 web edition, IIS6) and also when I run the web site from my desktop using ASP.NET Development Server.
The stored procedures are quite complex and return an XML document in an XMLType output parameter. When the stored procedures return without freezing the web page, they are fairly quick. During a previous phase to this project, the same PL/SQL techniques were used to return a CLOB from a PL/SQL function to classic ASP pages and they executed flawlessly (and still do). I've seen the freezing happen on a PL/SQL function that was unchanged from the previous phase of the project. The PL/SQL functions and procedures reside in packages (in most cases, it's the same package).
Here's a typical stored procedure call (I stripped down exception handling for simplicity's sake. No exception is thrown when it freezes):
Code:
Using odpConn As OracleConnection = New OracleConnection(ConfigurationManager.ConnectionStrings("MBS").ConnectionString)
'Open database connection
Try
odpConn.Open()
Catch ex As Exception
'Database connection error
Return ...
End Try
Try
Using odpCmd As OracleCommand = odpConn.CreateCommand()
'Execute Stored Procedure
odpCmd.CommandType = CommandType.StoredProcedure
odpCmd.CommandText = "CSE_OWNER.CSE_ADMIN.MEMBER_SEARCH"
odpCmd.Parameters.Add("ClientID", OracleDbType.Varchar2, clientID, ParameterDirection.Input)
odpCmd.Parameters.Add("UserID", OracleDbType.Varchar2, userID, ParameterDirection.Input)
odpCmd.Parameters.Add("GroupCriteria", OracleDbType.Varchar2, groupCriteria, ParameterDirection.Input)
odpCmd.Parameters.Add("GroupSearchType", OracleDbType.Varchar2, groupSearchType, ParameterDirection.Input)
odpCmd.Parameters.Add("MemberCriteria", OracleDbType.Varchar2, memberCriteria, ParameterDirection.Input)
odpCmd.Parameters.Add("MemberSearchType", OracleDbType.Varchar2, memberSearchType, ParameterDirection.Input)
odpCmd.Parameters.Add("ResultsPerPage", OracleDbType.Int16, resultsPerPage, ParameterDirection.Input)
odpCmd.Parameters.Add("UserType", OracleDbType.Varchar2, userType, ParameterDirection.Input)
odpCmd.Parameters.Add("out_xml", OracleDbType.XmlType, ParameterDirection.Output)
'********* FREEZES WHILE RUNNING THIS LINE **************
odpCmd.ExecuteNonQuery()
' Cast result to OracleXmlType and save cast into xmlResultsOracle
Dim xmlResultsOracle As OracleXmlType = CType(odpCmd.Parameters("out_xml").Value, OracleXmlType)
' Return XMLDocument
Return xmlResultsOracle.GetXmlDocument()
End Using
Catch ex As Exception
Return ...
Finally 'Close Connection
If odpConn.State = Data.ConnectionState.Open Then
odpConn.Close()
End If
End Try
End Using
Any ideas?
Thanks in advance,
Mike