且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio项目中的SQL连接字符串问题

更新时间:2023-02-17 08:07:15

您是否已将连接字符串添加到app.config中,还是在使用数据设计器时为您创建的?此处的底线是您已设计该应用程序以使用硬连线的连接字符串,因此可以动态地切换数据库 除非您添加或修改代码,否则这样做会成问题.
Did you add the connection string to the app.config or was it created for you when using the Data Designer? The bottom line here is that you have designed the app to use a hard-wired connection string, so switching databases dynamically is going to be problematic unless you add or modify the code to do so.