LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

I really like StyleCOp and why it’s only for C#

I really like StyleCop it is the right thing to do when you work in a team even if you are just a team of one. Being a team of one is very nice BTW, I happen to like myself ;-). But I degress. So Stylecop only works for C# now why is that? Doesn’t Microsoft care about us VB developers, don’t they think we should write well formated code. Don’t they think we should write good code.

Read More...

Read data on Mirror to prevent production database stress

Today my subscription from SQL Server Central had this for the question of the day, “Which of the following statements would you use to allow read-only access to the data and objects held within the mirrored copy of a mirrored database, without breaking the mirroring session?” The answer is pretty easy but I noticed there was an alarming amount of answers that were wrong. Mostly saying an ALTER for READ_ONLY was the way to get the job done.

Read More...

Exceptions can send you on the wrong path

This morning I got this exception when running my build on the build server. Command Line: “f:Source TexdatabasesProjectsTDB2007.Dal.DataAccessLayer.TestbinDebugTDB2007.Dal.DataAccessLayer.Test.dll” /config=“f:Visual Studio 2005ProjectsTDB2007ProjectsMenubinDebugDataAccessLayer.dll.config” /nologo<br /> Unhandled Exception:<br /> System.IO.FileLoadException: Could not load file or assembly ‘nunit.core, Version=2.4.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77’ or one of its dependencies. Exception from HRESULT: 0x80131902<br /> File name: ‘nunit.core, Version=2.4.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77’ —> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize —> System.Configuration.ConfigurationErrorsException: ‘NUnitCategories.Categories.nHibernate’ is an unexpected token. The expected token is ‘“’ or “‘.

Read More...

SQL Server 2008 R2 Announced, CTP Coming This Summer

Microsoft announced SQL Server 2008 R2 at tech-ed yesterday. Here are just a couple of key benefits or new things Support for more than 64 Logical Processors New Extensions in SQL Server Management Studio Manage Efficiently at Scale and Optimize Resources New wizards will allows DBAs to quickly discover databases across their environment, enroll them into centralized multi-server management, and within about 15 minutes have insights into utilization DBAs can will set policies to define a desired state utilization thresholds across target servers or applications within a new central management point

Read More...

Announcing PostSharp 1.5

Gael Fraiteur the developer of PostSharp is proud (or so he should be) to announse PostSharp 1.5. PostSharp is one of the best AOP engines in the .Net world. You can read more on the bugfixes on his mantis site. [ And of course the official announcement]2. Not more I can say really, except keep up the good work it’s much appreciated.

Read More...

Ignorance isn't necessarily bliss

In an era of multiple methods of immediate communication, there is no shortage of information and opinions that are easily distributed everywhere with little or no obvious signs of thought or reflection. While there are great advantages to such instant communication, it also represents dangerous opportunities for ignorance, intolerance and questionable judgment (among other things) to be spread out far beyond the boundaries within they were previously confined. Twenty years ago, it would have been necessary to seek out a library to perform research on any number of subjects.

Read More...

Creating A XSD Schema From A Table In SQL Server With FOR XML Syntax

You have a table and you would like to create a XSD schema based on that table. What is the easiest way to do that in SQL Server? The easiest way to do that would be to use FOR XML syntax with AUTO, ELEMENTS and XMLSCHEMA. If your table is named test and you want your schema to be named TestXsdSchema then you would do the following SELECT * FROM Test FOR XML AUTO, ELEMENTS, XMLSCHEMA('TestXsdSchema') Let’s look at a complete example.

Read More...

Using one Parameter for Multiple Datasets in Reporting Services

Here is a nice little tip that I noticed is often overlooked or just not known. When you have a report that has several datasets supplying multiple objects in the report and these objects are linked based on the selection of parameters in a parent object, you do not need to create multiple parameters and set them with expressions to the parent parameteres. All you need to do is write your procedures and reports to use the same name across the board.

Read More...

Banish IE6? Not As Easy As You Think

You have all seen sites that popup messages telling you that your IE6 browser is insecure and that you should upgrade to IE7/8, FireFox or Chrome. The reason for this is of course that IE6 is a terrible browser to develop against; nobody wants to spend half their time putting in CSS hacks so that their webpage looks halfway decent. Some sites like 37signals decided to dump IE6 completely So here is the problem with this, most companies I interact with won’t let you run as an administrator and you cannot install a single thing.

Read More...

VB.Net: declaring events a different way

Pre VB.Net 9.0 we used to write something like this to get an event that used a custom signature. vbnet public Event SomethingEvents(Byval somethingToPass as String) Now we can also write vbnet Public Event SomethingEvents As Action(Of String) Which is exactly the same thing but it looks so much cooler ;-).

Read More...