Data-binding a single application in different servers RRS feed

  • Question

  • Hi

    I have created a Dataset (Dataset1.xsd) and bind data with a data-grid and its working fine.

    In the connection string, the Data Source name is my development system's name (SQL Server database is in this system).

    This application have to install in multiple locations (with local databases for each locations) with database replication. 

    Please help, how to manage the data source name while installing in different locations. Should we use 4 different Exe files for each locations or is there a way to change data source of dataset without changing the source code.



    Arun Madhav

    Tuesday, May 26, 2020 12:47 PM


All replies

  • Hi Arun Madhav,
    I viewed your description and do you want to deploy applications with sql server?
    If so, you can use ClickOnce to publish.
    In the project properties, choose the "Publish" tab.
    Then click the "Prerequisites" button, you can select "SQL Express" in the prerequisites.
    More details you can refer to Reza Aghaei's answer
    Best Regards,
    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, May 27, 2020 8:03 AM
  • Hi Arun,

    No, you don't need 4 different Exe files, you simply need 4 different  .exe.config files. 

    ~~Bonnie DeWitt [C# MVP]

    • Marked as answer by Arun Madhav Thursday, May 28, 2020 5:44 AM
    Thursday, May 28, 2020 4:37 AM