PLS-00456: item 'OUTPARAMETER' is not a cursor when upgraded to .NET 5

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
df5
Posts: 15
Joined: Wed 20 Jun 2018 23:22

PLS-00456: item 'OUTPARAMETER' is not a cursor when upgraded to .NET 5

Post by df5 » Wed 24 Mar 2021 21:50

I am upgrading an existing project to NET 5 and now I get this error which is working perfectly fine on .NET CORE 3.1 and Devart.Data.Oracle.EFCore version 9.13.1107.

With NET 5 and Devart.DataOracle.EFCore version 9.14.1204 I get the error below during an insert:


This is the generated SQL which did not change but is now throwing an exception. Would you mind telling me if this is something on the MS ef core lib or is it something that Devart can fix/udpate?

Thanks.


DECLARE
updatedRowid ROWID;
BEGIN
INSERT INTO DATA_VERSION (ACTIVITY_TYPE_ID, ADJUSTMENT_TYPE, OPR_MONTH, POSTING_MONTH, POSTING_TYPE, SC_ID, VERSION_LABEL)
VALUES (:p0, :p1, :p2, :p3, :p4, :p5, :p6)
RETURNING ROWID INTO updatedRowid;
OPEN :outParameter FOR SELECT VERSION_ID FROM DATA_VERSION WHERE ROWID = updatedRowid;
END;
[14:40:07 ERR] An exception occurred in the database while saving changes for context type 'DbContext'.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
---> Devart.Data.Oracle.OracleException (0x80004005): ORA-06550: line 7, column 6:
PLS-00456: item 'OUTPARAMETER' is not a cursor
ORA-06550: line 7, column 1:
PL/SQL: SQL Statement ignored
at Devart.Data.Oracle.cp.b(Int32 A_0)
at Devart.Data.Oracle.ds.c(Int32 A_0)
at Devart.Data.Oracle.ds.a(Int32 A_0, bx A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.Entity.ao.a(CommandBehavior A_0)
at Devart.Common.Entity.cw.d(CommandBehavior A_0)
at Devart.Data.Oracle.Entity.ao.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: PLS-00456: item 'OUTPARAMETER' is not a cursor when upgraded to .NET 5

Post by Shalex » Fri 26 Mar 2021 15:36

Thank you for your report. We have fixed the bug and will notify you when the new public build of dotConnect for Oracle is available for download.

Post Reply