dotConnect for Oracle Stored Procedure

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 1
Joined: Wed 07 Jun 2017 06:34

dotConnect for Oracle Stored Procedure

Post by SrinivasPulla » Wed 07 Jun 2017 06:39


Issue - unable to run the oracle stored procedure.

Using entity framework core (fluent api) how to run an oracle stored procedure which returns a result. The below is the sample. But I am getting this exception -Devart.Data.Oracle.OracleException: 'ORA-01036: illegal variable name/number'

using (DatabaseContext db = new DatabaseContext())
OracleParameter curParam = new OracleParameter();
curParam.ParameterName = "curParam";
curParam.Direction = ParameterDirection.Output;
curParam.OracleDbType = OracleDbType.Cursor;

List<IDENTITYCLAIM> result = await db.IdentityClaimModel.FromSql("EXECUTE RETAIL.GET_IdentityClaim_PROC", new object[] { curParam }).ToListAsync();


Devart Team
Posts: 7972
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle Stored Procedure

Post by Shalex » Fri 09 Jun 2017 10:07

Please call your stored procedure via anonymous PL/SQL block:

Code: Select all

List<IDENTITYCLAIM> result = await db.IdentityClaimModel.FromSql("begin RETAIL.GET_IdentityClaim_PROC(:curParam); end;", new object[] { curParam }).ToListAsync();
Another way is to redesign your appoach to use Oracle pipelined function: viewtopic.php?t=34719.

Post Reply