Updating table at a different database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I'm using SqlDataAdapter to get records from table at database different
from my connection using the databasename at the select statment
"Select * from otherdb..myTable"
After updating the data I want to update the table, I'm using
SqlCommandBuilder to set the UpdateCommand at the SqlDataAdapter.
But when I use the SqlDataAdapter.Update I get an error :
"Invalid object name 'myTable'"
I tried to change the UpdateCommandText to "Update otherdb..myTable ..."
but it's not working.
I don't want to use another connection.
Is there a way of making it work?

Thanks,
Sharon.
 
Sharon,

What is the reason of
I don't want to use another connection.

Normally when you do it right you are creating everytime a new connection,
so why is this such a big issue?

Cor
 
Back
Top