Rrrriiiight... a classic case of unexpected behaviour causing confusion for the user. Oh well ;-) Turns out that Jason was right (as per usual). Still, the cast should not throw up an error that indicates a problem with the script, rather tell the user that it could not process the request (it did that, sort of...) Cheers, Martin