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.

Use common table expressions to simplify your updates in SQL Server

Someone asked two interesting questions last night 1) Is there a way to construct an empty CTE? 2) Can a CTE be modified? Can I insert rows after it has been constructed? Let’s look at question number one first. Is there a way to construct an empty CTE? Yes, there is, but why would you want to do this? Anyway, here is one way of having an empty CTE WITH Hello AS ( SELECT name FROM sysobjects WHERE 1 =0 ) SELECT * FROM Hello Question number two (Can a CTE be modified?

Read More...

Making a chocolatey package for chocolateyGUI.

Introduction If you are using Chocolatey and you would now like to make a package of your own program to make it available through Chocolatey then you need to go through a few steps. Here is how I did it for ChocolateyGUI. But you can also watch the video ferventcoder has put up on youtube. WarmUp First I installed WarmUp via Chocolatey of course. cinst warmup Or in my case I just used the GUI.

Read More...

Tweaking NHibernate Mappings at Runtime With a Remapper

Every once in a while, especially on legacy systems, you can run into database-specific issues that NHibernate can’t get around out of the box. We’ve been looking to convert from our current ORM to NHibernate, and run into a couple. One is self-inflicted (we use a DB-first codegen approach) and the other is forced on us by differences in the way Oracle and SQL Server handle ID assignment. So our problems are:

Read More...

Chocolatey GUI

Introduction I blogged about Chocolatey before and I even made it work behind my proxy, this change is even in the latest version so go get it. And now I made a GUI for it. And it works on the newly created website too. Namely http://chocolatey.org made by the always amazing Rob Reynolds aka ferventcoder. To install chocolatey now, open a powershell prompt, paste the following and type Enter: iex ((new-object net.

Read More...

Plaintextoffenders.com

I have had my ipad for a week now and I like it a lot but that is not what this post is about. This post is about an app I downloaded and how that app saves my password in plain text. How do I know they do this? Because if I request them to send me my password they actually are able to do it. Here is the proof. More or less.

Read More...

How much longer will the SQL Server database restore take

Frequently you will be asked how much longer a restore will take because someone needs to do something with that specific database that is restoring right now Of course we all know that the RESTORE DATABASE command has the STATS n option, this will give you the percentage completed. This is nice but it doesn’t tell you when it will complete and if someone else started the restore how will you know how long it will take in that case?

Read More...

Watch Me (and 23 Others!) During 24 Hours of PASS: Summit Preview

Twice a year, PASS puts on another great, free training event – 24 Hours of PASS. This is 24 one-hour presentations spread across two days. Did I mention it’s free? I remember the first 24HOP I attended two years ago. It was when they still did 24 hours straight. I got up at 5:00 AM local time to watch Gail Shaw talk about indexes. I think somewhere, I still have the photo of my, my computer, my coffee cup, and a clock showing the ridiculous hour.

Read More...

Microsoft SQL Server, codename "Denali", will be the last release to support OLE DB, ODBC is the new new thing

According to the Microsoft SQLNCli team blog, SQL Server, codename “Denali”, will be the last release to support OLE DB. Here is what they are currently saying The next release of Microsoft SQL Server, codename “Denali”, will be the last release to support OLE DB. OLE DB will be supported for 7 years from launch, the life of Denali support, to allow you a large window of opportunity for changing your applications before the deprecation.

Read More...

When is a LambdaExpression Body a UnaryExpression in C#?

Introduction A few weeks back I wrote about Fluentsecurty and the small bug it had which made it not work in VB.Net. Yesterday Kristoffer Ahl (The man behind the Fluentsecurity project) sent me a PM via twitter. I’ve added your changes. Don’t know how to test it properly though, without adding a VB.NET test project. Seems silly for 1 line! Ideas? And to be honest, I had no idea.

Read More...

Reporting Services Error: "The tablix has a detail member with inner members" (And How To Fix It)

As I work on my Reporting Services 201 session for PASS Summit 2011, I am reminded that there are a few areas I always struggle with. No matter how many times I add multi-value parameters, I usually forget to change the dataset WHERE clause to IN instead of =. And no matter how many times I create a list and add a table to it, I never remember to delete the detail rows.

Read More...