[英]How to query against a mdf file I attached in SQL Server in Visual Studio?
Hell all, 地狱所有人
I just attached a mdf file in SQL Server 2008, and everything is working correctly. 我只是在SQL Server 2008中附加了mdf文件,并且一切正常。 Now I want to open visual studio, and query against the mdf file I just attached, is there a local version of the connection string that needs to go in to web.config?
现在,我想打开Visual Studio,并查询刚刚附加的mdf文件,是否需要将本地版本的连接字符串输入到web.config中?
If I leave SQL Server open will it act as an instance of the database while I am working on the site in Visual Studio? 如果我在SQL Server中打开网站,则在SQL Server处于打开状态时,它将充当数据库的实例吗? Or am I suppose to run it somehow?
还是我想以某种方式运行它?
Any info would be appreciated, thanks! 任何信息将不胜感激,谢谢!
Just use Data Source=(local) to connect to the local instance of SQL. 只需使用Data Source =(local)连接到SQL的本地实例即可。
On a separate note, if it is a small app, consider using SQL Compact instead. 另外,如果它是一个小型应用程序,请考虑使用SQL Compact。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.