connection parameter is null in a Stored Procedure

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
awaitzbe
Posts: 16
Joined: Thu 05 Nov 2009 14:41

connection parameter is null in a Stored Procedure

Post by awaitzbe » Thu 26 Nov 2009 16:43

Hi,

When installed the latest version of dotConnect for Oracle 5.35.54 and Entitty Developer 2.50.50 I got the following exception when calling a stored procedure:

System.ArgumentNullException was unhandled
Message="Value cannot be null.\r\nParameter name: connection"

I know the connection is working because I have normal access to the database until the function call.

Thanks,


Here is the detailed message:

System.ArgumentNullException was unhandled
Message="Value cannot be null.\r\nParameter name: connection"
Source="Devart.Data"
ParamName="connection"
StackTrace:
at Devart.Common.Utils.CheckArgumentNull(Object value, String parameterName)
at Devart.Data.Oracle.OracleLob.b()
at Devart.Data.Oracle.OracleLob.f()
at Devart.Data.Oracle.OracleParameter.get_Value()
at Devart.Data.Oracle.Entity.c.a()
at Devart.Data.Oracle.OracleParameter.get_ArrayLength()
at Devart.Data.Oracle.OracleParameter.set_Value(Object value)
at Devart.Data.Oracle.Entity.c.a(Object A_0)
at Devart.Data.Oracle.Entity.c.b(Object A_0)
at System.Data.EntityClient.EntityCommandDefinition.SyncParameterProperties(EntityParameter entityParameter, DbParameter storeParameter)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommand.ExecuteScalar[T_Result](Func`2 resultSelector)
at System.Data.EntityClient.EntityCommand.ExecuteNonQuery()
at SecModel.SecEntities.Adddtl(Nullable`1 R_PRD_ID, Nullable`1 R_PRODDETAIL_TYPE_ID, String R_SOURCE, String R_COMMENTABOUT, String R_ISPRIVATE, Nullable`1 R_CONFIRMEDLEVEL, Byte[] R_RAW_DATA, String R_MD5, String R_CHARACTER_DATA, Nullable`1 R_CALENDAR_DATA, Nullable`1 R_ENTITYID_DATA, String R_OWNER, Nullable`1& CUR_ID) in C:\Documents and Settings\...Model.Designer.cs:line 378

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 27 Nov 2009 09:57

Thank you for the report, this error was already fixed.
Look forward for the next build.
P.S. I have deleted your duplicate post in the dotConnect for Oracle forum.

awaitzbe
Posts: 16
Joined: Thu 05 Nov 2009 14:41

Post by awaitzbe » Sun 29 Nov 2009 07:08

Thanks! :)

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 02 Dec 2009 16:02

The new build is available. Please let me know if something goes wrong.

Discovery
Posts: 14
Joined: Thu 24 Sep 2009 15:10

Post by Discovery » Wed 02 Dec 2009 17:05

AndreyR wrote:The new build is available. Please let me know if something goes wrong.
Which product is the new build available for ?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 03 Dec 2009 08:22

The new build of all dotConnects and Entity Developer for SQL Server is ready for download.

awaitzbe
Posts: 16
Joined: Thu 05 Nov 2009 14:41

Post by awaitzbe » Sun 07 Feb 2010 15:01

Hi, I have installed the dotConnect for Oracle v. 5.35.79 (Jan 14th 2010) and the same problem persists. On the call of the stored procedure it fails. Note that this problem was not present in v. 5.25.xx.

Error:

command.ExecuteNonQuery();
Value cannot be null.
Parameter name: connection

Details:

System.ArgumentNullException was unhandled
Message="Value cannot be null.\r\nParameter name: connection"
Source="Devart.Data"
ParamName="connection"
StackTrace:
at Devart.Common.Utils.CheckArgumentNull(Object value, String parameterName)
at Devart.Data.Oracle.OracleLob.b()
at Devart.Data.Oracle.OracleLob.f()
at Devart.Data.Oracle.OracleParameter.get_Value()
at Devart.Data.Oracle.Entity.c.a()
at Devart.Data.Oracle.OracleParameter.get_ArrayLength()
at Devart.Data.Oracle.OracleParameter.set_Value(Object value)
at Devart.Data.Oracle.Entity.c.a(Object A_0)
at Devart.Data.Oracle.Entity.c.b(Object A_0)
at System.Data.EntityClient.EntityCommandDefinition.SyncParameterProperties(EntityParameter entityParameter, DbParameter storeParameter)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommand.ExecuteScalar[T_Result](Func`2 resultSelector)
at System.Data.EntityClient.EntityCommand.ExecuteNonQuery()
at SecModel.SecEntities.Adddtl(Nullable`1 R_PRD_ID, Nullable`1 R_PRODDETAIL_TYPE_ID, String R_SOURCE, String R_COMMENTABOUT, String R_ISPRIVATE, Nullable`1 R_CONFIRMEDLEVEL, Byte[] R_RAW_DATA, String R_MD5, String R_CHARACTER_DATA, Nullable`1 R_CALENDAR_DATA, Nullable`1 R_ENTITYID_DATA, String R_OWNER, Nullable`1& CUR_ID) in c:\documents and settings\awaitzbe\my documents\copy of opsecdb\opsecdb1\opsecdb1\opsecmodel.designer.cs:line 386
at opsecdb1.DetailsView.InsertDetailToDB(Prd_Details dtl, Nullable`1 to_prd) in C:\Documents and Settings\awaitzbe\My Documents\Copy of OpSecDB\opsecdb1\opsecdb1\DetailsView.xaml.cs:line 291
at opsecdb1.DetailsView.ModifyDtl(Detail prd_dtl) in C:\Documents and Settings\awaitzbe\My Documents\Copy of OpSecDB\opsecdb1\opsecdb1\DetailsView.xaml.cs:line 282
at opsecdb1.DetailsView.SaveCurrentItem() in C:\Documents and Settings\awaitzbe\My Documents\Copy of OpSecDB\opsecdb1\opsecdb1\DetailsView.xaml.cs:line 840
at opsecdb1.OpsecClient.SaveBtn_Click(Object sender, RoutedEventArgs e) in C:\Documents and Settings\awaitzbe\My Documents\Copy of OpSecDB\opsecdb1\opsecdb1\OpsecClient.xaml.cs:line 403
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()

awaitzbe
Posts: 16
Joined: Thu 05 Nov 2009 14:41

Post by awaitzbe » Sun 07 Feb 2010 15:43

Also, the problem is apparently in dotConnect, not in Entity Developer. So the question is actually in the wrong forum, but still...
When I reinstall the previous version it handles the stored procedure well without any change in the code (generated by the new version).
Thanks,

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 08 Feb 2010 09:50

Could you please send me a small test project including the procedure script?
We are unable to reproduce the situation using common tests.

Post Reply