Hello. I am having problems finding out why I cannot open a connection to my local SQLExpress instance from a vb.net form. I have looked all over the internet, but nothing I have tried works. Can anyone offer help? Thanks!!
Here is my code...it bombs at the last line where the connection is opened.
Dim ConnStr As String = "Server=localhost;DataBase=TableDining;User Id=myName;Password=pwd@1!"
Dim sqlConnection As New Data.SqlClient.SqlConnection(ConnStr)
Dim strSQL As String = "SELECT * FROM table WHERE (PIN = 1111)"
Dim cmd As New Data.SqlClient.SqlCommand(strSQL, sqlConnection)
cmd.CommandType = CommandType.Text