如何将SQL Server数据库附加到asp.net [英] how to attach sql server data base to asp.net
本文介绍了如何将SQL Server数据库附加到asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将sql server附加到asp.net?
how to attach sql server to asp.net?
推荐答案
您必须通过web.config
完成它
添加以下内容,并阅读有关如何从Web应用程序调用数据库调用的更多信息.
You have to do it through the web.config
Add the following, and read more about how to invoke database calls from your web app.
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
阅读以下内容以获取更多详细信息.
http://msdn.microsoft.com/en-us/library/ms178411.aspx
Read the following for more details.
http://msdn.microsoft.com/en-us/library/ms178411.aspx
您可以通过在Google本身中进行搜索来获取解决方案.
尝试此 [如何将sql数据库连接到asp.net [
You can get the solution just by searching in google itself.
Try this[^].
or
how to connect sql database to asp.net[^]
这篇关于如何将SQL Server数据库附加到asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文