Dim myCn as SqlConecction '(o es con una c SqlConection)
'mucha ayuda de Studio .Net creo...
'bueno sigamos con el codigo
Private Sub AbrirConexion()
Dim strCn, srtServer, strDataBase, strUserId, strPassword as String
strServer = "data source=(localhost)" 'nombre de maquina
strDataBase = "database=Pubs" 'base de datos
strUserId = "User Id=sa"
strPassword = "password="
strCn = strServer & "; " & strDataBase & "; " & strUserId & "; " & strPassword
myCn = new sqlConection(strCn)
try
myCn.open()
catch err as SqlException
msgbox("ocurrio un error: " & err.Message.ToString())
end try
End Sub