Monthly Archives: January 2006

To Close or Not to Close?

January 30, 2006 To Close or Not to Close? Whether tis
better to close a sql connection in a finally block or let it
automatically close with a using statement. That is the
question. I was once asked this question in an interview.
Will a Sql Server connection automatically close if it is
opened in a C# using statement? At the time, I was used
to manually closing connections in the finally section of a
try / finally block. This ensured that the connection would
always be closed, and returned to the connection pool,
even if an exception occurred after opening the
connection. Here’s an example of that technique. Continue reading

Posted in Technical | Leave a comment

Installing Components in the Visual Studio Toolbox

January 29, 2006 Installing Components in the Visual Studio Toolbox There are two parts to
this story. The first part is deals with how to interact with the Visual Studio development
environment programmatically, in order to add a tab to the toolbox and place components on
it. That can be accomplished within the confines of a simple Console application. However, in
a real-world scenario, you’d want to install your custom components by means of a Setup
project with an MSI file, which first installs the components into the Global Assembly Cache
(GAC). That’s what the second part of the story is all about: creating a setup and deployment
project that first installs Continue reading

Posted in Technical | 1 Comment

App Settings in Visual Studio 2005

January 21, 2006 App Settings in Visual Studio 2005 Everyday I’m learning new things about
Visual Studio 2005 and version 2.0 of the .Net Framework. Most of the time when I “google”
something (I like it when a company name becomes a word in the English language), I can quickly
find several examples of what I want to do, and I quickly go about my business. However, now and
then, there’s a topic for which I’m not able to find any really good examples. The new application
settings feature in Visual Studio is, I believe, a case in point. In the old days of Visual Studio 2003, Continue reading

Posted in Technical | 5 Comments

We’ve Moved!

Today we closed escrow on the sale of our town home in Santa Clarita (Saugus). Two years ago
we bought a 3 bedroom, 2 ½ bath unit, in a complex at the corner of Seco Cyn and Copper Hill Rd,
with a two-car garage and about 1300 square feet. In spite of the hassles of moving, we decided it
was a good time to sell, because it looks like the housing market may finally be peaking. Of course,
we thought it had almost peaked 2-3 years ago, but it just kept going higher. But prices have risen
to such a level that we’ll soon reach a point – in fact we may already be there – where just a very
small minority of households can afford to purchase a home in certain areas of Southern California. Continue reading

Posted in Personal | 8 Comments