I am having a small problem I am trying to add data to my database on my local SQL Server. I inserted this Try...Catch... Statement in my code to find the problem.
Code:
Code'Execute the SqlCommand object to insert the new data...
Try
objCommand.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(Err.Description)
End Try
System.Data.SqlClient.SqlException: Invalid Column Name 'AIncome'......
That is how the column is labeled in the Sql Database.
Code:
'set the SqlCommand object properties...
objCommand.Connection = SqlConnection1
objCommand.CommandText = "INSERT INTO Demo " & _
"(Address, AIncome, CNumber, ECost, FName, ID, LName, Status)" & _
"VALUES (@Address, @AIncome, @CNumber, @ECost, @FName, @ID, @LName, @Status);":