Monthly Archives: March 2005

Moranbah Road Trip

Since we had a few days off over the Easter period, Claire and I thought it would be awesome if we could get up to North Queensland to see Wayne & Rosie. Claire already had a few extra days off over the period as a result of the school break, so I took two extra days off in annual leave as well.

We left on our ‘road trip’ at about 7am on Friday morning and after a few tanks of fuel, about twelve and a half hours in the car seat, we arrived in Moranbah. To give you a guide of just how far that is, we drove from the Gold Coast to roughly parallel to Mackay, however about 2 hours West from there.

Which ever way you look at it, it is a very long drive to do in one day and I was so happy when we finally arrived. The first 800km just flew by. However the last 200-250km were just please hurry up and finish already!.

Here now, eating lots, sleeping lots, keeping out of the heat of the day and catching up with close friends; doesn’t get a whole lot better than that.

ASP Error ‘800a000d’

We recently purchased new hardware at work (2x IBM eServers) for the pending rollout of our new software. The new software went live on Monday and as a by product of the change, some of our existing sites in ASP3 also had to be moved around.

Before the move, all the sites were functioning error free on a Windows 2000 Server platform with IIS5. Once moved onto the new servers, which were Windows 2003 Server and IIS6 – some of them started throwing errors in various places. These sites were initially written between 12 and 18 months ago now; so the code was capable of working fine if the initial programmer had taken some care.

The error I received was:

  1. Microsoft VBScript runtime error '800a000d'
  2. Type mismatch
  3. /default.asp, line 518

Line #518 had this to reveal:

  1. If Session("GreatDealID")=52 Then

So the error is clear, Session("GreatDealID") was being stored as a string in the Session. It was compared to a numeric type and failed. The solution would be either of the following lines:

  1. If Session("GreatDealID")="52" Then
  2. If CInt(Session("GreatDealID"))=52 Then

What I find interesting, is that in IIS5, it was more than happy to automatically cast the Session("GreatDealID") from a VBString into a VBInteger, yet IIS6 threw an error. I initially thought it might have had something to do with IIS6 enforcing an Option Explicit for ASP. However if it did that, all of the undefined variables used through the site (I know) would have also thrown errors, yet they didn’t.

I haven’t bothered looking to find out exactly why the error suddenly appeared. For the moment, “the code was poor, it then errored”, will do. Anyone else come across it or know why it changed in IIS6, if that is infact the cause?

Unpacked

Claire and I are now officially moved and unpacked into our new place. We have been in a similar state for quite some time now, however there were a few niggling boxes that we didn’t have a home for. Since the new bookcase has arrived and some of my various computer boxes were thrown out, we found more space.

There are now no boxes to be seen anywhere in the house, everything has either had a home found for it or has been thrown out as it was old junk. It is amazing just how much cleaner and organised the house looks without those extra boxes that were in the corner.

It only took us about three months, that isn’t so bad is it?

Sunburn, Stage 3

Alistair Lattimore's Sunburnt Legs, Stage 3As you have probably guessed, I got sunburnt while go karting with one of my older brothers and some friends about 2 weeks ago. Well after considerable pain initially, utilising gallons of aloe vera and moisturiser, I am very happy they have recovered to a semi normal state.

In the last two weeks, I have gone from white to a bright red, to tiny blisters and then pealing. The pealing has just about finished now. It now doesn’t hurt to walk back to my car of in the afternoon sun, yippee! The colour in my legs now is my normal ‘white tan’, on top of my ‘pink’ skin. Some people just weren’t meant to have a tan – I’m one of them.

Lets hope it doesn’t happen again any time soon.

ASP isNumeric

You would assume that the isNumeric fucntion would return a false value if you passed it an alphanumeric string. However, after checking through some things; it appears that it considers 6,6 as an numeric value.

In this instance, the value is coming from a query string so you would assume that the variable sub-type would be a string. If you test that using the VarType function, it does indeed return a value of 8 (indicating VBString as the sub-type), yet some how it is also numeric.

The only way I can see that this is logical, is that it might be allowing the comma through based on the premise that it is a valid currency formatting character, such as $123,456.78. The Microsoft documentation for isNumeric indicates that it will allow a period (.) through, however mentions nothing about a comma at all.

A simple code example:

  1. Dim sValue
  2. sValue = 6
  3. Response.Write isNumeric(sValue) ' prints True
  4. sValue = 6.0
  5. Response.Write isNumeric(sValue) ' prints True
  6. sValue = "6,6"
  7. Response.Write isNumeric(sValue) ' prints True
  8. sValue = "6, 6"
  9. Response.Write isNumeric(sValue) ' prints False

If it is allowing the comma through for currency reasons then I would consider the function to be flawed. A comma isn’t part of a number system, it is part of a currency system which changes from country to country. Further to that point, if isNumeric considers “6,6” to be a number, then you should also be allowed to cast it into a numeric type (from the variable sub-type VBString) into an integer for instance.