JOINING TWO TABLES IN TWO DATABASES IN TWO DIFFERENT SERVERS AND RETURNING A DATASET

  • I have two databases situated at two MS SQL Servers and one of them is kept as global.

     

    I have a table called MANUFACTURER table in the global DB and ITEMS table in the other DB.

     

    MANUFACTURER

    MfgID    MfgName   MfgDesc

     

    ITEMS

    ItemID    ItemName   ItemDesc MfgID

     

    Now I want to refer to MANUFACTURER table from the other database which is in the other server where my query is executed.

     

    For e.g. I want to create a dataset by joining the MANUFACTURER to ITEMS table and include Manufacturer name and description in this dataset, which i'll be using as a source of my datagrid in my interface.

     

    Ie;

    Resultant DATASET should be

    ItemName, ItemDesc, MfgName, MfgDesc

      

    Will I have to get the data to this server from the Global DB which is in the other?

     

    Can somebody help me with this, I'd be really, really grateful.

     

    Thanks so much,

    Ron.

  • you can use linked server to link one SQL Server to another.

    Check it out from Books OnLine

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply