Changing dataset connection string at runtime

后端 未结 3 1833
说谎
说谎 2021-01-02 06:14

I have a c# generated dataset. How can I change the connection string so I can use the dataset with another (identically structured yet differently populated) database? Th

3条回答
  •  鱼传尺愫
    2021-01-02 06:44

    You can modify a single instance of the table adapter.

    _myAdapter.Connection.ConnectionString = connectionString;
    

提交回复
热议问题