When Reusing OracleCommand After Using It for A Stored Function, ORA-1008 Can Occur
(Doc ID 3062449.1)
Last updated on DECEMBER 05, 2024
Applies to:
Oracle Data Provider for .NET - Version 19.1.0.0.0 and laterGeneric Windows
Symptoms
When reusing OracleCommand after using it for a stored function, you may encounter ORA-1008 in the following scenario:
(1) Instantiate OracleCommand class
(2) Set the property BindByName to True.
(3) Set a PL/SQL anonymous block that executes a stored function like below, or set the function name, and then issue ExecuteNonQuery()
begin :ret := func1(:param1)
(4) Without disposing and re-instantiating OracleCommand class, set another SQL statement like below, and then issue ExecuteQuery() or ExecuteNonQuery()
select c1, c2, c3 from test1 where c1=:val1 and c2=:val2
or
update test1 set c1=:val1 c2=:val2
Specific code examples are provided below:
This problem only occurs when using ODP.NET Unmanaged driver.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |