Hello,
I use DB first and I import insert procedure for my entity with 2 parameters where second is output cursor with generated Id. But when somebody change procedure and add input parameter to middle I get error when I try to call procedure. There is no problem with exception on call but with message. Error looks like this
Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : Devart.Data.Oracle.Entity
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void a(System.Collections.Generic.IEnumerable`1[System.Data.Common.DbParameter], Devart.Common.Entity.el)
HResult : -2147467261
Stack Trace : at Devart.Data.Oracle.Entity.z.a(IEnumerable`1 A_0, el A_1)
at Devart.Data.Oracle.Entity.aj.b(CommandBehavior A_0)
at System.Data.Mapping.Update.Internal.FunctionUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
Can you return better excpetion with message that I have wrong number of parameters?
Regards
Object reference not set on procedure call
Re: Object reference not set on procedure call
This is the error I received with the latest (8.4.264) build of dotConnect for Oracle using your scenario:
Please upgrade to the 8.4.264 version. If this doesn't help, send us a small test project with the corresponding DDL script of stored procedure for reproducing the System.NullReferenceException.
Code: Select all
[...]
InnerException: Devart.Data.Oracle.OracleException
Message=ORA-06550: line 2, column 4:
PLS-00306: wrong number or types of arguments in call to 'DEPT_insert'
ORA-06550: line 2, column 4:
PL/SQL: Statement ignored
StackTrace:
at Devart.Data.Oracle.a2.c(Int32 A_0)
at Devart.Data.Oracle.cm.d(Int32 A_0)
at Devart.Data.Oracle.cm.a(Int32 A_0, b7 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.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at Devart.Data.Oracle.Entity.ai.a(CommandBehavior A_0)
at Devart.Common.Entity.ah.b(CommandBehavior A_0)
at Devart.Data.Oracle.Entity.ai.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)