If you got that error, then you did connect, you just didn't authenticate. I recommend checking the username and password you have on the SQL Server machine itself. Also, verify that the SQL Server instance is configured to permit remote login (unless you are logging in over ssh).
Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. ~Stan Kelly-Bootle