December 2005 - Posts

Scanner interfaces suck

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Scanner interfaces suck
The new RSS feed is here

I've been around computers for many years now probably about 20 and have used scanners for probably 15 of those years and what has changed.

Very little if anything.

The reason for this rant is two fold. Firstly I am at the end of a scanning marathon, I finally got the cameras we had on the tables at our wedding developed and wanted to scan the pictures. 17 films x 26 exposures = lots of scanning, I have been scanning the negatives so can do that 4 at a time. This wouldn't be too bad if I could set the sanner going to do a set and carry on with something worth while. oh no. The scanner software (i presume the TWAIN interface bit) pops up and takes focus almost every tick of the progress bar. This means you can't do anything else, because this thing keeps popping up and getting in the way.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Scanner interfaces suck

Event Handlers aren't as straightforward as they appear

I'm not a c# expert, but I likt to think I can get to the bottom of most stuff. This especially true with the way I think most of .Net is written, its fairly obvious once you think about it. However events are something that has just got me.

So I've created a class with an event on it and then tried to raise the event only to get a null exception !! whats that about. I've used the same code to raise the event, myEvent (this, args).

So I google and as ever find the answer quite quickly. The issue I have is that I was raising the event at a point where there are no handlers attached to the event i.e. the constructor. Therefore when the event was raise there wasn't any where to raise it to so you get the null exception. The way round it is to put some null checking in.

myEventHandler foo = myEvent;
if (foo!=null)
   foo(this, args)

Thanks to Roland for the pointers and the argument that this isn't intuitive. I agree.

http://weblogs.asp.net/rweigelt/archive/2005/01/15/353333.aspx

SQL Server Training and events (some free)

I have decided to start putting together a list of SQL Server Events that are happening in the next year, this is my current list.

A couple I would highlight,

  • The Kimberley Tripp day seminars run the the UK SQL Server User group are a bargin at £149. Based on experience they will be great, really intense with indepth and very interactive. Plus Kimberley  is a great presenter.
  • The UK Community Launch in Feb is being run by me and you’ll have the chance of winning copies of SQL, Visual Studio Pro and training vouchers, plus hoepfull some books.
  • and finally The SQL Mag event includes a free subscription to the digital subscription to SQL Mag And can be upgraded to a print copy for an the extra ($29.95)

Events and Training

Event Date Price Location URL
MSDN Webcast: SQL Masterclass: The New XML Data Type (Level 300) 20 Dec 2005, 05:00 PM Free Online msdn.microsoft.com
SQL 2005 UK Community Launch Feb 09 2006 Free Reading (UK) www.sqlserverfaq.com
SQL Server 2005 Up and Running Roadshow Feb 06 2006 £69 London sqlmag.com
European PASS Feb 22–24 2006 €745 Barcelona www.sqlpass.org
Indexes from Every Angle - Internals, Statistics, Performance, Maintenance (Kimberly Tripp) March 14 2006 £149 Reading (UK) www.sqlserverfaq.com
SQL Server 2005 Practical Guide to Availability and Recovery (Kimberly Tripp) March 14 2006 £149 Reading (UK) www.sqlserverfaq.com
SqlConnections April 2 -5 2006 $1,295 Las Vegas www.devconnections.com/shows/sqlspring2006/
DevTeach May 8-12 2006 $767.11 Montreal www.devteach.com/Register.asp
Microsoft Tech 2006 June 11–16 2006 $995

Boston, MA

www.microsoft.com/events/teched2005/teched2006.mspx
US PASS Nov 14–17 2006 $995

Seattle

www.sqlpass.org

Microsoft  Free eLearning

SSIS Tip: Use variables rather than expressions in loops

When using loops in Integration Services you can set the value of sub tasks using expressions. If these epxressions are to be based on the values obtained in the loop I advise that rather than using a complex expression in the task. Instead set a variable to be the complex expression and then set the expression of the task to that variable.

This allows very easy debugging, because you easily see the variables at runtime in the debug windows (Locals)

You can then reuse that value multiple times, i.e. if you want to obtain the name of the file not the complete path. This variable can then be passed to say a script task to provide additional logging/debug information.

SSIS Tip: Always use try catch in Script Component

I have found that occasionally errors that occur in a script component can cause the package to fail but the error is lost.

This might sound like an obvious statement, but I advise that you use the try catch block in your script component. This is especially true when populating a column with a value as this is the most likely cause of errors in script components and largely down to truncation errors.

If you want to redirect errors to another output this is also essential.

Enhanced Error Component

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Enhanced Error Component
The new RSS feed is here

I have finally got my Enhanced Error Component online.

You can download it from here http://sqlblogcasts.com/files/3/custom_components/default.aspx

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Enhanced Error Component

Update your holding page

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Update your holding page
The new RSS feed is here

Its always funny when websites forget to change their holding page, I would have expected better from MSDN.

Trying to access the MSDN SSIS forum I just got

"The Microsoft Forums are currently down for maintenance. We apologize for this inconvenience while we update the site. The site should be back up by Thursday November 3rd 1700 PST. Please check back then."

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Update your holding page

Google Ranking for Simon SQL

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Google Ranking for Simon SQL
The new RSS feed is here

For a while now there have been a few Simons out there that have ranked higher than me for SQL. Well I've just checked and this blog is now positioned no 1 for Simon SQL which is very pleasing.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Google Ranking for Simon SQL

New Help topics in BOL for SSIS

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/New Help topics in BOL for SSIS
The new RSS feed is here

Ever wanted to load balance packages, well there is now information on running and logging load balanced packages in Intergration services in Books Online.

Paste this link in the URL in BOL to find the start page ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/9281c5f8-8da3-4ae8-8142-53c5919a4cfe.htm

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/New Help topics in BOL for SSIS