Mysql enterprise 8 with .net core 3.1. Getting error Data is Null. This method or property cannot be called on Null values.
Posted by: Kamran Shahid
Date: April 24, 2020 11:16AM

I have .net core 3.1 application
I am getting following error on mysql 8 enterprise edition when connecting from a linux
rogram Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at MySql.Data.MySqlClient.MySqlDataReader.GetFieldValue(Int32 index, Boolean checkNull)


Strange thing is when trying to same db from windows i am not getting this error.
Stored procedure i am accessing having just one parameter.
Error from linux system removed when i added CheckParameters=false in the connection string.
But i am confused why it is happening as my stored procedure have no more then single parameter.

Options: ReplyQuote


Subject
Written By
Posted
Mysql enterprise 8 with .net core 3.1. Getting error Data is Null. This method or property cannot be called on Null values.
April 24, 2020 11:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.