What is your system? I'm not sure I would be able to run this script even at work.
However, at my older job we used a similar script as well, as I now recall. I can search for it, but it looks to me that your select command is somehow wrong, thus you get the error.
Post both select commands you tried with your parameters.
Are you sure your script worked fine as a script?
>Hmmm... I still get an OLE "unspecified error" on the
objRecordSet = objCommand.Execute
line.
>
If it's not broken, fix it until it is.
My Blog