Welcome to MSDN Blogs Sign in | Join | Help

February 2006 - Posts

SYSK 72: Fast Comparison of Dates

It’s well known that comparing variables of DateTime data type, whether in .NET or in SQL, is not the fastest operation… So, if you have a table with EffectiveDate and ExpirationDate columns, and you need to get only rows where EffectiveDate >= Now
Posted by irenak | 2 Comments

SYSK 71: Dataset Footprint in Memory vs. Remoting Size

A lot of good discussions have been held over the last several years on the remoting size of a dataset. Significant improvements have been made in ADO.NET 2.0 to reduce the remoting footprint of a dataset by using binary serialization. But is the dataset
Posted by irenak | 2 Comments

SYSK 70: Where Does the Expression “You’re Fired” Come From?

I’ve been “under the weather” for the last week or so, and ran out of prepared appdev SYSK items, so this one is a filler… The expression "to get fired" comes from centuries ago. When clans wanted to get rid of their unwanted people without killing them
Posted by irenak | 0 Comments

SYSK 69: Visual Studio – Controlling Which Files Are Saved At Build Time

Did you know you can modify what gets saved before building? Go to Tools -> Options -> Projects and Solutions -> Build and Run settings. The first combo box is ”Before building”, which has the following options: - Save all changes (default) -
Posted by irenak | 0 Comments

SYSK 68: Choosing Between T-SQL and .NET Stored Procs

The official recommendation is relatively well known by now, and is stated below: Transact-SQL is best for situations in which the code will primarily perform data access with little or no procedural logic. Programming languages that are compatible with
Posted by irenak | 0 Comments

SYSK 67: SQL – Who is Connected and What are They Running?

Want to know who the users that are connected and how many sessions do each of them have? Then use the new sys.dm_exec_sessions view: SELECT login_name, count(session_id) as session_count FROM sys.dm_exec_sessions GROUP BY login_name Want to know who
Posted by irenak | 0 Comments

SYSK 66: .NET 1.1 and 2.0 Handles ASCII Encoding Differently?

My tests show that the answer is Yes… See it for yourself. Create a windows app in VS 2003, add one text box and one button to a form and put the following code behind the button click: // A bunch of bytes represented by their code string[] input = "98
Posted by irenak | 6 Comments

SYSK 65: Change to Full Trust Definition in .NET 2.0

Did you know that full trust assemblies now satisfy any code access security demands? In the .NET Framework 2.0, any fully trusted assembly will satisfy any demand, including a link demand for an identity permission, such as a System.Security.Permissions.StrongNameIdentityPermission,
Posted by irenak | 0 Comments

SYSK 64: Notes from “Windows Presentation Foundation Under the Hood” talk

The other day, I listened to a "Windows Presentation Foundation Under the Hood" talk by Leonardo Blanco and Mike Hillberg. Below are the notes from it, excluding Q&A session. Components that make up the platform: 1. Element System - the most visible
Posted by irenak | 0 Comments

SYSK 63: Vista’s Speech Capabilities

The next version of OS (Vista) will have state-of-the-art speech technology built right in. WinFX will have a powerful API for enabling your users to speak to your apps and your apps to speak to your users. At the last PDC (2005), Phillip Schmid, Robert
Posted by irenak | 7 Comments

SYSK 62: Jim Allchin's view of what Vista will offer the enterprise

Vista brings to the enterprise much more than just enhanced security. Amongst many features I personally look forward too, are -- much better monitoring, new diagnostic tools and far fewer reboots. Here are some others… Vista will also introduce a new
Posted by irenak | 3 Comments

SYSK 61: Creating Temporary (not persisted, a.k.a. in-memory) Projects in VS 2005

If you miss the old VB 6.0 (and prior) feature of being able to create a project and not save it to the disk (e.g. a short lived test project you plan to run once and then destroy), the read on… In VS.NET it’s called Zero-Impact Projects, and it allows
Posted by irenak | 1 Comments

SYSK 60: How Does SqlBulkCopy Deal with Duplicate Records?

The other day, I was asked the following question “Does the SqlBulkCopy update records if they already exist or must it be used only for INSERTS only?” So, I thought others might benefit from knowing the answer… SqlBulkCopy is nothing more than a more
Posted by irenak | 5 Comments

SYSK 59: How to Stay Young

Those of you who follow my blog know that I almost never write on topics outside of appdev… But this one, by George Carlin, is just too good to keep it to myself. 1. Throw out nonessential numbers. This includes age, weight and height. Let the doctors
Posted by irenak | 2 Comments

SYSK 58: Making Code Line Length Conformance Easy in VS

Many teams agree on the maximum line length that should not be exceeded for code readability. Usually, it’s either 80 or 120 characters long. The question is, how do you conform to this rule? Some of you may know this trick, but for those who don’t, there
Posted by irenak | 0 Comments

SYSK 57: Handy Undocumented Stored Procs

In case you didn’t know, there are a couple of very cool SQL stored process that allow you to execute a T-SQL statement for each table and for each database. They are sp_MSforeachdb and sp_MSforeachtable. For example, executing sp_msforeachtable 'sp_spaceused
Posted by irenak | 0 Comments

SYSK 56: A Word on Frameworks (from the lighten up series)

Ok, it’s time to lighten up a bit… and then to think a bit on not such a light topic. Check out this humorous and, at the same time, thought provoking piece on frameworks by Benji Smith at http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12
Posted by irenak | 0 Comments

SYSK 55: Rotate SQL table without any INNER JOIN (narrow to wide table without PIVOT)

If you have a narrow table, e.g. just the following columns -- GroupId, DataId, DataValue (frequently used to store facts, e.g. questions and answers) – but you want to get all data ids and values for a given group id as one row , try the SQL below: CREATE
Posted by irenak | 3 Comments

SYSK 54: The New Way to Deal with Apostrophes in SQL

In SQL, you can now use quotename instead of ‘’’’… So, if you need to pass O’Brian as the last name, you no longer have to replace it with double apostrophes to make it O’’Brian – just use the new quotename(@lastname, ‘’’’) in your queries. This function
Posted by irenak | 0 Comments

SYSK 53: To Close() or to Dispose()? That is the question…

Since I’m still meeting developers that are not quite sure of the differences between the two, and the choice that’s right for them, I decided to blog on the topic… Just so we are all on the same page, you need to call Close or Dispose methods to release
Posted by irenak | 9 Comments
 
Page view tracker