Possible Duplicate:
SQL - Connect to Linked Server with Named Instance
I want to connect to a Remote Server DB using Linked Servers. I want this connection to be done by a C# program. How to connect these Linked Servers in C#?
Possible Duplicate:
SQL - Connect to Linked Server with Named Instance
I want to connect to a Remote Server DB using Linked Servers. I want this connection to be done by a C# program. How to connect these Linked Servers in C#?
A linked server is an object on a SQL Server instance, so if you connect to that instance you can query the linked server as if you were quering any other object on one of the instance's databases.
here is an example:
SELECT *
FROM OPENQUERY ( <linked_server>, 'select code, name, from your_table')
Not sure if this is the answer you were looking for, maybe if you provide more details of your scenario e can help you a little bit more
You can do it in sql just like an other Sql Query apart from giving linkedserver name in it, so the connection string remain the usual way we use without a linked server Here is nice site that gives various types of connectionstrings
SELECT * FROM linkedServerName.TheDatabaseName.dbo.TheTableName