[
https://issues.apache.org/jira/browse/LOG4NET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564526#action_12564526
]
Ron Grabowski commented on LOG4NET-28:
--------------------------------------
Its generally a good idea to post general questions about log4net to the
mailing lists first. This issue has been closed for almost 3 years.
Are you using a RawPropertyLayout layout?
<parameter>
<parameterName value="@productId" />
<dbType value="String" />
<size value="50" />
<layout type=" log4net.Layout.RawPropertyLayout">
<key value="ProductId" />
</layout>
</parameter>
log.Debug("Message");
// snip
IDbDataParameter param = (IDbDataParameter)command.Parameters["@productId"];
Assert.AreEqual(DBNull.Value, param.Value);
> AdoNetAppender does not support inserting NULL into columns
> -----------------------------------------------------------
>
> Key: LOG4NET-28
> URL: https://issues.apache.org/jira/browse/LOG4NET-28
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.9
> Reporter: Nicko Cadell
> Assignee: Nicko Cadell
> Priority: Minor
> Fix For: 1.2.10
>
>
> The AdoNetAppender does not support inserting NULL values into columns.
> If a column allows NULL values then the AdoNetAppender should allow NULL
> values to be inserted. For most value types this means using the DBNull value
> for the parameter. The AdoNetAppenderParameter should convert CLI null values
> into DBNull values before setting the parameter value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.