Good mileage

A recent study conducted by Wits University found that the average South African walks about 1200 kms a year. Another study by the South African Medical Association found that South Africans drink, on average, 100 litres of alcohol a year.

This means, on average, South Africans get about 12 kms to the litre.Kind of makes you proud to be South African!

Welcome to 64-bit hell

I just spent a few hours trying to figure out an issue on a project I started a while back to automate the SQL replication setup for any servers we add to our environment.  I started the project when I had some free time a few months ago, then got going on another project which took preference, and now finally have time to get going again.  First thing I did after loading the solution was hit F5 to run it, making sure that everything is as it should.  Also remembering that I left it in a working state when I put it on the back-burner.

Then I get this beauty

"Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Now my first reaction was that I reinstalled my machine recently, upgrading from XP SP2 to Windows 2008 64-bit edition, so I double checked my installation of the SQL Server SDK, and the various other things that are referenced in this project, but no luck.  AARRRRGGGHHH!!!

Boot up the XP VM, test the project there and it works like it should.

So, I went back to my dev environment and do what I should have done in the first place, click that friendly "Search for more help online".  And first in the list is the description for the System.BadImageFormatException with a simple solution.

Turns out that the SQL Replication SDK was developed for 32bit platforms only, so go to the Project Properties, select the Build page and set the Target Platform to x86.  Hit F5, and my project is back to a working state.

Baby is now 12 weeks

We had a visit to the doctor yesterday afternoon for the next scan.  Baby is healthy with a heartbeat that sounds like she's climbing L'Alpe-d'Huez.  She's now 5.9cm tall.

I say she because Leigh believes it's a girl, we have not had confirmation yet, maybe in 4 weeks time. 

Solution Provider

 

A farmer stopped by the local mechanic shop to have his truckfixed. They couldn't do it while he waited, so he said he didn't live far andwould just walk home. On the way home he stopped at the hardware store and boughta bucket and a gallon of paint. He then stopped by the feed store and picked upa couple of chickens and a goose.

However, struggling outside the store he now had a problem -how to carry all his purchases home. While he was scratching his head he was approachedby a little old lady who told him she was lost. She asked, 'Can you tell me howto get to 1603 Mockingbird Lane?'

The farmer said, 'Well, as a matter of fact, my farm is veryclose to that house I would walk you there but I can't carry this lot.'

The old lady suggested, 'Why don't you put the can of paint inthe bucket. Carry the bucket in one hand, put a chicken under each arm and carrythe goose in your other hand?'

'Why thank you very much,' he said and proceeded to walk theold girl home.

On the way he says 'Let's take my short cut and go down thisalley. We'll be there in no time.'

The little old lady looked him over cautiously then said, 'Iam a lonely widow without a husband to defend me… How do I know that when we getin the alley you won't hold me up against the wall, pull up my skirt, and haveyour way with me?'

The farmer said, 'Holy smokes lady! I'm carrying a bucket, agallon of paint, two chickens, and a goose. How in the world could I possibly holdyou up against the wall and do that?'

The old lady replied, 'Set the goose down, cover him with thebucket, put the paint on top of the bucket, and I'll hold the chickens.'

SSIS – Accessing variables from script components

 In SSIS there are are two different types of script components.  The Control Flow script, and the Data Flow script.  These 2 use different ways of accessing package variables, which was a bit confusing the first time I used teh Data Flow script component.

In the Control Flow script component you access package variables in a similar way to how DTS used to do it.

Dts.Variables("User::FromDate").Value.ToString

 However, trying this in the DataFlow script component only cause some compilation errors and nothing more.

After doing some searching, I eventually found the simple solution that was staring me in the face all along, I just never tried it.

Me.ReadOnlyVariables("User::FileName").Value.ToString()

In both cases you still have to tell the component which variables you're passing in on the property page.