Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle11g - OracleValueConverter - GetValue throws System.NullReferenceException #46

Closed
opejanovic opened this issue Oct 29, 2020 · 4 comments

Comments

@opejanovic
Copy link
Contributor

opejanovic commented Oct 29, 2020

Hi,
I got System.NullReferenceException while I was trying to read PLSQLAssociativeArray output parameter.

in line 63, we will have System.NullReferenceException if valueType.GetProperty("IsNull", typeof(bool)) is null
var isNull = (bool)valueType.GetProperty("IsNull", typeof(bool))?.GetValue(value);

I discovered this when I tried to get value from OracleString[]
This was working in previous version

image

@opejanovic
Copy link
Contributor Author

opejanovic commented Nov 2, 2020

try running test:
[Fact] public void GetOracleStringArray() { var oraString = new OracleString[] { "Foo", "Bar" }; var result = OracleValueConverter.Convert<string[]>(oraString); result.Should().HaveCount(2); }

@opejanovic
Copy link
Contributor Author

Pull request has been created

epaulsen added a commit that referenced this issue Nov 6, 2020
Issue #46 - Fixing converting OracleString[], OracleDecimal[] to .NET native data types
@epaulsen
Copy link
Contributor

epaulsen commented Nov 6, 2020

Shipped in version 2.0.1
https://www.nuget.org/packages/Dapper.Oracle/2.0.1

@opejanovic
Copy link
Contributor Author

I think we can close this one. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants