Monthly Archives: May 2010

log4net Template for CodeRush

If you use log4net for logging in the traditional way you end up having a lot of classes with the following line: <span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> mLog </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> log4net.ILog </span><span … Continue reading

Posted in CodeMinder, CodeRush | Leave a comment

Drop a SQL column default constraint that has been implicitly named

CodeMinder: to remind myself of stuff that I usually have to look up each time I do it. Notice the unnamed default in the following line: alter table test add col1 int not null default 1 This creates a default … Continue reading

Posted in CodeMinder, Programming, SQL | Leave a comment

Update a SQL table’s XML value to remove nodes

CodeMinder: to remind myself of stuff that I usually have to look up each time I do it. To delete all PersonAlternativeName nodes from XmlColumn of the People table: <span style="color: #0000ff;">with</span><span style="color: #000000;"> xmlnamespaces( </span><span style="color: #ff0000;">'</span><span style="color: #ff0000;">http://mydomain.com/person/extension/0.1</span><span … Continue reading

Posted in CodeMinder, Programming, SQL, XML | Leave a comment

Select multiple XML nodes out of each row in a SQL table

CodeMinder: to remind myself of stuff that I usually have to look up each time I do it. If a People table has a column named XML, and the XML column may specify multiple PersonAlternativeName entities, then to get all … Continue reading

Posted in CodeMinder, SQL, XML | Leave a comment