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.

Vulnerability in DirectX Could Allow Remote Code Execution

Vulnerability in Microsoft DirectShow Could Allow Remote Code Execution Microsoft is investigating new public reports of a new vulnerability in Microsoft DirectX. From Microsoft Security Advisory (971778) Microsoft is investigating new public reports of a new vulnerability in Microsoft DirectX. The vulnerability could allow remote code execution if user opened a specially crafted QuickTime media file. Microsoft is aware of limited, active attacks that use this exploit code. While our investigation is ongoing, our investigation so far has shown that Windows 2000 Service Pack 4, Windows XP, and Windows Server 2003 are vulnerable; all versions of Windows Vista and Windows Server 2008 are not vulnerable

Read More...

An nUnit testfixture file template for resharper that also conforms to stylecop laws

Like the title says An nUnit testfixture file template for resharper that also conforms to stylecop laws. Here it is. ```csharp // ——————————————————————————————————————– // <copyright file=“$FileName$” company=“$Company$”> // $Author$ // </copyright> // <summary> // Tests the $FIXTURE$ type. // </summary> // ——————————————————————————————————————– namespace $NAMESPACE$ { using NUnit.Framework; /// &lt;summary&gt; /// Test for $FIXTURE$ /// &lt;/summary&gt; [TestFixture] public class Test$FIXTURE$ { /// &lt;summary&gt; /// Test $TestName$ /// &lt;/summary&gt; [Test] public void $TestName$() { } } }``` That’s the way I like them and no more stylecop warnings.

Read More...

Compression tools are a must for any DBA

There are a few things a good DBA really can’t live without in his or her arsenal of tools to better manage a wide array of instances. This includes OLAP and OLTP strategies. One of those tools is a good compression tool. I’ve never been one to promote software and kind of hate it when others try to jam it down my throat. I have what I need to make the decision on my own and know how to use Google and read reviews along with statistics provided.

Read More...

Getting the UnderLyingType of a Generic Object in VB.Net

I was in need of some reflection to determine the underlying type when I used Nullable. For instance Nullable(Of Date). First of course I did a Google. And I found Get underlying type from a nullable type by Rydal Williams. And there I found the C# version of how to do this. So I translated that and I found something new. Watch carefully. vbnet For Each _PropertyInfo In _model.GetType.GetProperties(Reflection.BindingFlags.Public or Reflection.

Read More...

Is an index seek always better or faster than an index scan?

We all know that we should avoid index and table scans like the plague and try to get an index seek all the time. Okay, what will happen if we fill a table with one million rows that have the same exact value and then create a clustered index on it. Yes, you can create a clustered index on a non unique column because SQL Server will create a uniquefier on that column to make the index unique.

Read More...

SQL Server does support regular expressions in check constraints, triggers are not always needed

Someone posted the following question I need to add table called group with a column called code How do I add a check constraint to the column so it will only allow the following alphabetic characters (D, M, O, P or T) followed by 2 numeric characters. Someone posted the following answer You cannot do this out of the box – MS SQL Server does support CHECK CONSTRAINTS – but for things like a maximum or minimum INT value, or a string length or such.

Read More...

Multi-Value Parameters in SSRS

Background I have a report that returns specific documentation from the database with one parameter, a CustomerID. The report is bound to a stored procedure which has hard-coded in it the names of the specific documents that should be included. This solution is problematic because when the list of documents needs to change, the SP has to be updated, which means mistakes can be (and have been) made. The good step of converting the SP to use a table doesn’t satisfy me fully, because these reports are executed from a special reporting system that also has its own list of document names, so that it knows when to kick off a particular report—for example, if none of the documents exist, no report will be generated.

Read More...

Here Is Yet Another Reason For Upgrading To SQL Server 2008 From SQL Server 2000

I had to restore a bunch of databases yesterday from our live server running on SQL Server 2000 to a server running SQL Server 2008. These databases range in size from 5 GB to well over 100 GB. I remember when I scripted out the biggest database with all the filegroups and ran that script on a 2000 box it took over an hour to create this database. The reason for this is that all the filegroups get filled with zeroes.

Read More...

Using VB10 to make a spectral library

Most of you guys don’t know what a spectral library is and I forgive ye. But I needed something to test this brand new thing. So I choose something I know and something I know is hard to find. But this is all about the new VB10. So I started of by downloading the also new Windows 7 RC and VS2010 beta 1. I installed windows 7 on a Virtual machine for Virtual PC.

Read More...

SQL Server 2008 Developer Training Kit Available For Download

Microsoft has made available the SQL Server 2008 Developer Training Kit for download. The size of the download is 57MB. The SQL Server 2008 Developer Training Kit will help you understand how to build web applications which deeply exploit the rich data types, programming models and new development paradigms in SQL Server 2008. Overview SQL Server 2008 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2005.

Read More...