Skip to content

MikeBevers.be

Putting it out there…

Archive

Archive for July, 2009

A new task

Recently I was given a little task about extracting data from a SQL Server 2005 to a Microsoft Access database. The objective was to drop an Access file on a shared filesystem location within the company.

I chose to work with the SQL Server Integration Services (SSIS), which was built for such tasks. You can find some general info about SSIS on the Microsoft SSIS homepage.

SQL Server integration Services is an available option when you’re installing SQL Server 2005 (Standard, Developer or Enterprise Edition).

continue reading…

How to kill open processes in MS SQL Server

You may frequently need in especially development and test environments instead of the production environments to kill all the open connections to a specific database in order to process maintenance task over the SQL Server database.

In such situations when you need to kill or close all the active or open connections to the SQL Server database, you may manage this task by using the Microsoft SQL Server Management Studio or by running T-SQL commands or codes.

continue reading…

The Problem

Another user has locked a file for checkout, but is no longer available to check the file back in and now you need that file.

continue reading…

The problem

I was debugging an old project which used untyped DataSets. The DataTable contained timelisting details of employees. I already filtered the DataTable so I got all records for a certain employee. It still contained about 600 records. I needed to know the distinct dates on which the employee listed his time.

However, the DataTable class doesn’t contain a “SELECT DISTINCT” method. So before I would start doing crazy tricks, I asked my friend Google if he knew anything about the matter.

continue reading…

The problem

I needed to access the outlook calendars of some colleagues, to check if they were on holiday or not. At the time, I only had access to the Outlook Web Access (OWA).

Because there is no button like in MS Outlook like “Open a Shared Calendar”, we have to be creative.

continue reading…

How it doesn’t work

I had to create a Form that closes when the user pressed his escape button.

So I the first thing that came up was the KeyDown or KeyPress event on the Form.

private void FormParameters_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyCode.Equals(Keys.Escape))
        this.Close();
}

private void FormParameters_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar.Equals(Keys.Escape))
        this.Close();
}

You don’t have to try this, because it doesn’t work.

continue reading…