|
-
Nov 12th, 2006, 12:39 AM
#1
Thread Starter
Hyperactive Member
strange SQL error in SQL Server
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?
I tried to end process on Visual Studio 2005
but PETA stopped me saying it's smart enough
to be a living creature 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|