Funny results from SQL command used in VBScript
Hi Everyone,
I am currently writing a VBScript that will help us update our asset tracking database as we deploy workstations. Here is the statement I am having trouble with:
objConnection.Execute "SELECT Department FROM tblEmployee WHERE USERID='"&Username&"'",Department
My connection to the database works and I have used this command in SQL Server's query analyzer and it works but when I run it from the VBScript, I invetiably get a Department Value of -1. Can anybody point me in the right direction? thanks!