This windows app I just wrote on another computer and copied it to a nearly identical system throws both of these exceptiions on the same line of code -
A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Invalid column name 'WvArtist1'.
Here is a code snippet with the line marked which throws the exception -
Dim objConnection3 As New SqlConnection("Data Source=localhost\SQLEXPRESS;Initial Catalog=sql_song1;User ID=sa;Password=xxxxxxxx")
Dim objDataAdapter3 As New SqlDataAdapter
Dim objDataSet3 As New DataSet
objDataAdapter3.SelectCommand = New SqlCommand()
objDataAdapter3.SelectCommand.Connection = objConnection3
objDataAdapter3.SelectCommand.CommandText = "SELECT * FROM tblWave1 WHERE tblWave1.WvArtist1 LIKE '%" & SearchStr3 & "%' "
'Fill the dataset object with data
objDataAdapter3.Fill(objDataSet3, "D3") <<----------here
Note in an earlier part of the Windows App an Open and Select statement to the same Sql database works fine. I'm stubbed as to why.
Thanks in advance - Marvin E Marshall
The second exception I know definatively is not wrong. I think the fresh copy of SqlExpress that I downloaded was set up the same.