I have to make a connection to a SQL Server database which is hosted at ip:aaa.xxx.yyy.zzz the user of this server is 'user' and password is 'password'. Database name is 'datos'
I tried this but it didn't work.
Dim myConn As SqlConnection
Dim myCmd As SqlCommand
Dim myReader As SqlDataReader
Dim results As String
myConn = New SqlConnection("Server=aaa.xxx.yyy.zzz;Database=datos;Trusted_Connection=True")
myConn.Open()
I also tried:
myConn = New SqlConnection("Server=aaa.xxx.yyy.zzz;Database=datos;User ID=user;Password=password")
EDIT
This code is into a sub named 'SQL', when it excecute myConn.Open() the sub finishes but shows no error.
Ip is on local network, and 'datos' was created on the local of the server using Microsoft SQL Server Management Studio