Home All Groups Group Topic Archive Search About

How to query a linked server

Author
5 Oct 2006 9:58 PM
Romano
I have an existing Linked Server on SQL Server 2005 where the Provider is
"OLE DB Provider for Microsoft Directory Services".

I need to query this provider from a C# application and store the results in
a dataset. 

The closest information I could find is

http://msdn2.microsoft.com/zh-tw/library/ms162171.aspx

but this actually creates a Linked Server instead of "using" an existing one.

Thanks.

Author
6 Oct 2006 3:18 AM
Cowboy (Gregory A. Beamer)
A sproc that calls the linked server is the easiest to me, but as long as
you alias the server properly, you can do it with sql in your objects. In
this instance, the procedure will add a bit of security.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
Show quote
"Romano" <Rom***@discussions.microsoft.com> wrote in message
news:DB17A495-0BBF-40F4-87C9-7DED7B6D9AFD@microsoft.com...
>I have an existing Linked Server on SQL Server 2005 where the Provider is
> "OLE DB Provider for Microsoft Directory Services".
>
> I need to query this provider from a C# application and store the results
> in
> a dataset.
>
> The closest information I could find is
>
> http://msdn2.microsoft.com/zh-tw/library/ms162171.aspx
>
> but this actually creates a Linked Server instead of "using" an existing
> one.
>
> Thanks.

AddThis Social Bookmark Button