Everything looks fine.

I would suggest that there is some network problem preventing your machine from seeing the SQL server. For the record this is my way of doing it and it works.

Imports System.Data.SqlClient

----

Dim cn As New SqlConnection( _
"data source=myServer; database=myDatabase; user id=myUserName; password=myPassword")

cn.Open()

---

Hope this helps
Simon