views:

339

answers:

1

I'm trying to use Linq to run queries against a linked server on our SQL Server machine through Visual Studio.

On the SQL Server, I've successfully created the linked server and can run queries on it. In Visual Studio I've added a new data connection (under Server Explorer) to the SQL Server with success but the linked server tables are not available.

How can I get the linked server tables to show up? Or can I even do this?

+3  A: 

I usually create a view in a local database for each table I access through a linked server. That allows me to change the links as needed without having to change any SQL. And you should be able to use the view in LINQ to SQL without issue.

Jeff Siver
I accepted this because it's a neat idea I didn't think of. Turns out you cannot link to a linked table in SQL Server. You can reference the table in a SQL Query but it doesn't show up as a table.
Clint Davis