The blog has moved to ... Many google searches point here so I am leaving it operational, but there will be no new posts.

Thursday, March 3, 2011

varchar (MAX) SqlParameter length

I am using log4net and the AdoNetAppender to log all entries to MSSQL server. The exception column by default is 2000, sometimes the stack traces get large. Not wanting to lose any information I changed the DDL to use varchar (MAX) but I also had to update the appender configuration. Using a size of -1 for the @exception parameter seemed to do the trick.


No comments: