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

Nullable int 32 number type handler fails when procedure returns a null rather than a number #37

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Using trunk branch, but still occurs in other versions.

if NullableInt32TypeHandler.GetDataBaseValue gets called with a DBNull, it will 
fail because it tries to convert it to Int32 without testing for null.  Same 
happens with other nullable number types.  
I got this to happen with calling insert on datamapper when it is mapped to a 
procedure with returnclass as int? and the stored procedure or function returns 
null.

DataMapper.Insert("Diagnostics_WindowsEventCriteria", hash);

<procedure id="Diagnostics_WindowsEventCriteria" parameterClass="Hashtable" 
resultClass="int?" >
WINDOWSLOGSEARCHCRITERIA #Error# #ErrorSeverityId#
</procedure>

I would expect to get a null value back




Original issue reported on code.google.com by Marc...@gmail.com on 25 Jan 2012 at 7:01

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

1 participant