I run this completely normal command:
Function GetVehicleStatus() As DataTable
Connection.Open()
Dim strSQL As String = "SELECT * FROM Auto"
Dim ReadOnlyTable As New DataTable
Adapter.SelectCommand = New SqlClient.SqlCommand(strSQL, Connection)
Adapter.Fill(ReadOnlyTable)
Connection.Close()
Return ReadOnlyTable
End Function
and get an error saying: "Invalid object name 'Auto'."
But trust me, Auto exists as a table in the database. I'm looking at it right now in VS. I even tried it with another table name and I got the same thing. It apparently connect correctly cuz I got lots of testing stuff before this and the connection.open runs fine. There's no reason I can see that it shouldn't run anyone see anything wrong with it or something?