I hope someone can help me. The code shown here connects perfectly well to my remote SQL Server, but when used in an UWP application, it hangs the app and sometimes throws a network connection error, but does not want to connect and retrieve any info from the SQL Server.
Dim str As String = "Data Source=SQLSERVER-ADDRESS;Initial Catalog=master;Persist Security Info=True;User ID=******;Password=******"
Dim conn As New SqlConnection(str)
Dim strSQL As String = "SELECT ID, FName, LName FROM Users" '"SELECT ID, FName, Name FROM Users"
Dim cmd As New SqlCommand(strSQL, conn)
conn.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader
While rdr.Read()
Dim str2 As String = "" & rdr(1) & " " & rdr(2)
user_list_listbox.Items.Add(str2)
End While
conn.Close()