title: log4net database appender not inserting
body: <p>My Database appender is not working and I can't figure out why, the connection is working and I've tested the appender's command text in sql management studio.</p>
  
  <pre><code>public class KennyLoggins
  {
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      public DateTime Date { get; set; }
  
      public string Thread { get; set; }
  
      public string Level { get; set; }
  
      public string Logger { get; set; }
  
      public string Message { get; set; }
  
      public string Exception { get; set; }
  }
  </code></pre>
  
  <p>I've setup tracing for log4net and it doesn't seem to be getting any errors.</p>
  
  <pre><code>  &lt;system.diagnostics&gt;
      &lt;trace autoflush="true"&gt;
        &lt;listeners&gt;
          &lt;add
              name="textWriterTraceListener"
              type="System.Diagnostics.TextWriterTraceListener"
              initializeData="log4net_debug.txt" /&gt;
        &lt;/listeners&gt;
      &lt;/trace&gt;
    &lt;/system.diagnostics&gt;
  </code></pre>
  
  <p>The log4net config:</p>
  
  <pre><code>&lt;log4net&gt;
    &lt;root&gt;
      &lt;level value="ALL" /&gt;
      &lt;appender-ref ref="ADONetAppender" /&gt;
    &lt;/root&gt;
  
    &lt;appender name="ADONetAppender" type="log4net.Appender.ADONetAppender"&gt;
      &lt;bufferSize value="100" /&gt;
      &lt;connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
      &lt;connectionString value="Server=.\SQLEXPRESS;Database=MyDB;Integrated Security=True;" /&gt;
      &lt;commandText value="INSERT INTO KennyLoggins ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" /&gt;
  
      &lt;parameter&gt;
        &lt;parameterName value="@log_date"/&gt;
        &lt;dbType value="DateTime"/&gt;
        &lt;layout type="log4net.Layout.RawTimeStampLayout"/&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@thread"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="255"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%thread"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@log_level"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="50"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%level"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@logger"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="255"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%logger"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@message"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="4000"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%message"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@exception"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="2000"/&gt;
        &lt;layout type="log4net.Layout.ExceptionLayout"/&gt;
      &lt;/parameter&gt;
    &lt;/appender&gt;
  
  &lt;/log4net&gt;
  </code></pre>
  
  <p>I'm using the same connection string that I'm using for Entity Framework with my ADONetAppender, could that be an issue?</p>