Procedure with OUT-param as sys_refcursor fails after x time
Posted: Tue 18 May 2010 15:05
Hello hello,
I feel like I have to deal with some very strange behaviour in my app using dotconnect en Oracle client (10.2)
I have a simple stored prodecure with only one out parameter as type sys_refcursor (in the procedure, only a simple SQL statement is code there.
PROCEDURE SELECT_LIBRARY_GEOMETRY (
p_ResultSet OUT sys_refcursor
)
OPEN p_ResultSet FOR
SELECT ...
END SELECT_LIBRARY_GEOMETRY;
When I now execute this storedprocedure in my application using dotconnect en oracle client mode (direct == false)
I simply execute a stored-procedure with no parameters filled in (and parametercheck == true) I do not add the output-parameter myself, because the support-guys told me the output params are populated automatic.
But now, After some iterations of
oracleCommand.ExecuteNonQuery()
--> the parameter-value of the output-parameter is suddenly "null" instead of a real "Devart.data.oracle.oraclecursor".
Remarks: I only create the oracleCommand instance once, and tested it with a one-time prepare() call or with everytime a prepare() call before ExecuteNonQuery --> but problem stays the same.
And the really strange part is, if I change over to direct mode in connectionstring (and don't change any code) --> I never have the above problem ???
So, is there some strange behaviour possible or restrictions applied when using stored-procedures with cursor-output parameters and the oracle client itself.
A possible solution could be to switch to direct-mode (but then I have to deal with the direct-mode limitations) and I there must be a correct way to execute the same procedure several times (with the least performance hit of creating objects, parameters checks, hard/soft parsings, caching of statements, ...)
Does anyone have some clever tips or hints ?
thx
Fred
[/b]
I feel like I have to deal with some very strange behaviour in my app using dotconnect en Oracle client (10.2)
I have a simple stored prodecure with only one out parameter as type sys_refcursor (in the procedure, only a simple SQL statement is code there.
PROCEDURE SELECT_LIBRARY_GEOMETRY (
p_ResultSet OUT sys_refcursor
)
OPEN p_ResultSet FOR
SELECT ...
END SELECT_LIBRARY_GEOMETRY;
When I now execute this storedprocedure in my application using dotconnect en oracle client mode (direct == false)
I simply execute a stored-procedure with no parameters filled in (and parametercheck == true) I do not add the output-parameter myself, because the support-guys told me the output params are populated automatic.
But now, After some iterations of
oracleCommand.ExecuteNonQuery()
--> the parameter-value of the output-parameter is suddenly "null" instead of a real "Devart.data.oracle.oraclecursor".
Remarks: I only create the oracleCommand instance once, and tested it with a one-time prepare() call or with everytime a prepare() call before ExecuteNonQuery --> but problem stays the same.
And the really strange part is, if I change over to direct mode in connectionstring (and don't change any code) --> I never have the above problem ???
So, is there some strange behaviour possible or restrictions applied when using stored-procedures with cursor-output parameters and the oracle client itself.
A possible solution could be to switch to direct-mode (but then I have to deal with the direct-mode limitations) and I there must be a correct way to execute the same procedure several times (with the least performance hit of creating objects, parameters checks, hard/soft parsings, caching of statements, ...)
Does anyone have some clever tips or hints ?
thx
Fred
[/b]