Yasser, My problem is identical to yours, I get the same NullPointerException. My code is has identical set up to yours. I can see nothing wrong... I have checked that port 1433 was open on the server, and it was. I can't offer any more suggestions, just wanted to say we are 'in the same boat' awaiting suggestions....