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.

SQL 2008 Reporting Services renderers

Friday, 9 May 2008

Yesterday I caught Keith's talk on new features in SQL Server 2008 Reporting Services at the monthly meeting of the Adelaide SQL Server User Group. I must say, as someone who's only just started using the original SQL 2000 Reporting Services a few weeks ago, I was drooling at the pretty new designer. Not to mention the new features and enhancements. Very nice!

Talking with my DECS colleagues this morning, the question of renderer support arose. Specifically will 2008 natively render reports as a Word document? (I understand that to do this previously, you needed to purchase 3rd party addins)

Turns out the answer is "Yes!". As of the February 2008 CTP, the following renderings are supported:

More details of the new features (grouped by CTP release) are published on the SQL Server 2008 TechNet site.

Tech-Ed 2008 Registration

Thursday, 8 May 2008

Chuck mentions that the Australian Tech-Ed 2008 conference site is now live. Not sure if it's a firewall issue, but I tried clicking on the 'Register Now' link, and it doesn't work.

The only time I've missed attending in previous years was when family commitments coincided (eg. birth of children). That's also why I decided I wouldn't travel to Wagga for this year's CodeCampOz - the timing was too close to the due date for G3, and I didn't want to risk being stuck in regional NSW should my wife suddenly go into labour!

The other big difference is that previously I had the support of my work paying for registration, travel and accommodation.

So if I did attend this year I'd have to cover the costs all by myself. $AU1,749 just for early-bird registration sounds like a lot of money, especially when it's your own!

One thing at a time though. G3 is due next week, so by mid-June I might have a clearer idea of whether popping off to Sydney in early September is a good idea (or not!)