Can I use datasource=.\\SQLEXPRESS or do I need to now use: machinename\\SQLEXPRESS

落花浮王杯 提交于 2020-01-02 06:07:17

问题


Can I still use datasource=.\SQLEXPRESS or do I need to change it to : machine_name\SQLEXPRESS for a local instance of SQL Server 2008 Express in C#?

My connection string worked fine in SQL Express 2005, but with the same settings no longer works for 2008.


回答1:


Assuming the instance name is indeed SQLEXPRESS, using .\SQLEXPRESS will work locally.

Use the SQL Server Configuration Manager to find out the correct instance name.




回答2:


What is the final purpose of the app as it more conventional to include pc name.



来源:https://stackoverflow.com/questions/6139299/can-i-use-datasource-sqlexpress-or-do-i-need-to-now-use-machinename-sqlexpr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!