Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with sqldataadapter

Status
Not open for further replies.

markprog

Programmer
Oct 4, 2004
12
US
I am working on filling a dataset with an SQL table from our SQL 2000 Server.

When I go to do the .Fill with the dataset I receive a System.Data.SqlClient.SqlException error "Invalid object name"

my code follows:

Dim strSQL As String
Dim strConn As String
Dim objSQLDA As SqlClient.SqlDataAdapter
Dim objOrders As New Data.DataSet

strConn = "server=MYSERVER;" & _
"database=MYDBS;" & _
"user=MYUSER;" & _
"password=MYPASSWORD;"

strSQL = "SELECT * FROM orders"

objSQLDA = New SqlClient.SqlDataAdapter(strSQL, strConn)

objSQLDA.Fill(objOrders)

Any help would be appreciated.

 
Never mind.

My orders table wasn't called "orders".

"I picked the wrong week to stop sniffing glue
 
Oh, I've had that problem befor too.

Me: "Why wont this dang SQL work?"
DBA: "For the Orders table?"
me: "Yeah! see look, my SQL is good!"
DBA: "For the Oreders table maybe."
me: "I'll go flog myself now, thank you."
DBA: "Don't mention it."

-Rick

----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top