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

Null sql parameter value being passed as default #51

Closed
Bruddles opened this issue Oct 17, 2017 · 1 comment
Closed

Null sql parameter value being passed as default #51

Bruddles opened this issue Oct 17, 2017 · 1 comment
Assignees
Labels
bug A bug, or functionality that doesn't work as expected

Comments

@Bruddles
Copy link

This if block is causing a null valued sql parameter to be passed to SQL as default.
When this parameter doesn't have a default, it throws a the exception:

The parameterized query '(@param decimal(5,2))select @param' expects the parameter '@param', which was not supplied.

if (value == null)
{
parameter.Value = null;
return;
}

@Bruddles Bruddles added the bug A bug, or functionality that doesn't work as expected label Oct 17, 2017
@billings7
Copy link
Contributor

Note: This has been fixed as part of the changes made for #45 and related issues, but that branch is not stable yet and contains a number of breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug, or functionality that doesn't work as expected
Projects
None yet
Development

No branches or pull requests

2 participants