Can't get this code to execute - it is telling me that I have an invalid connection.... I know my connection string works because it executes with other statements.
What am i missing?
Dim strCon As String
Dim xID as Integer
strCon = "MyConnection" 'Valid Connection String
Dim sqlConn As New Data.SqlClient.SqlConnection(strCon)
Dim command As New Data.SqlClient.SqlCommand
command.Connection = sqlConn
command.CommandType = Data.CommandType.StoredProcedure
command.CommandText = "UpdateNewLoan"
Catch ex As Exception
MessageBox.Show("Failed to execute command")