New workplace checklist

Tuesday, 27 May 2008

There's nothing like changing employers (eg. leaving UniSA for the world of contracting) to make you realise there's lots of things you need to (or should) know, either before you start or very soon after.

Each workplace is different - some things will be common (eg. provision of toilets!), but there can be differences or variations.

In no particular order, here are some things that came to mind:

Can you think of anything else I've forgotten?

Amelia is home

Thursday, 22 May 2008

Ashford Hospital have a scheme called "Baby Bliss" where you can transfer to the Adelaide Hilton and finish your hospital stay there. They provide a midwife onsite, but it's only suitable for mothers and babies that are doing really well and don't require other medical attention.

View from our hotel room across Victoria SquareWe found out on Saturday that the Doctors were happy for us to take this up, so that night the five of us spent our first night together as a family. The older kids enjoyed the experience - watching the trams and the fountain in Victoria Square from our room, Chinese takeaway and breakfast at the Pancake Kitchen. Narelle particularly enjoyed the room service (which is included for the mother).

 

Amelia asleep on the couchMonday morning Narelle and Amelia were able to come home. Narelle is recovering quickly and Amelia is feeding and sleeping really well. She's also doing the other thing that babies do a lot of as well :-)

I don't plan to blog anymore about Amelia at this stage. I prefer to be cautious about publishing details of our kids online (I know there are people out there that would misuse this information). When they're old enough I'll let our kids make that choice themselves.

Amelia Jane Gardiner

Thursday, 15 May 2008

I'm extremely proud to announce the birth of our third child - Amelia Jane Gardiner. She was born yesterday morning at Ashford Hospital, weighing in at respectable 7lb 4oz (in the old money).

David holding Amelia

Narelle and Amelia are both doing very well.

Amelia with her big brother and sister

ADO parameterised queries and return values

Tuesday, 13 May 2008

Back before ADO.NET, we used good old ADO to do our data access in our ASP pages. To improve performance and avoid SQL injection attacks, it is good practice to use parameterised queries or stored procedures. Usually these are interchangeable but I've noticed today that ADO throws up the following error if you try and set up a return value parameter:

Microsoft OLE DB Provider for SQL Server error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

For example, the following code gives that error:

Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = conn

Dim ParamReturn
Set ParamReturn = Cmd.CreateParameter("Return", adInteger, adParamReturnValue)
Cmd.Parameters.Append ParamReturn
Cmd.CommandText = "INSERT INTO table (col1) VALUES (?); RETURN SCOPE_IDENTITY()"
Cmd.CommandType = adCmdText

Cmd.Parameters.Append Cmd.CreateParameter("p1", adInteger, adParamInput, , "value")

Cmd.Execute 

I haven't found any solution, other than to use a stored procedure instead. Presumably return values aren't supported for plain parameterised queries, though I haven't seen that documented anywhere (yet).

GMail contacts and Thunderbird

Friday, 9 May 2008

For a while now I've been using the Sync Kolab extension for Mozilla Thunderbird to synchronise changes to the Thunderbird Address Book.

This works quite well, but it only synchronises with other Thunderbird sessions. What I really wanted was to use the Contacts from GMail and synchronise with that. That way, whether I'm using Thunderbird, or just the GMail web interface, I'll have the same details available for all the people in my contacts list. The problem is that Google hadn't provided an API for accessing the Contacts data, but that all changed last month.

The good news is that Zindus are already working on a new extension for Thunderbird to synchronise with Google Contacts. I plan to try this out very soon.

There's also support for the Contacts API in Google's .NET Client Library, should you wish to use this in a .NET application.