App_Data数据库附件 [英] App_Data Database Attachment

查看:81
本文介绍了App_Data数据库附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我正在研究一个ASP.NET项目.我认为这是我第一次设计不会在localhost上运行的应用程序(它将在Internet上托管),我试图将数据库附加到app_data文件夹,但它会生成错误.我正在运行VS2010 Professional Edition和SQL Server 2005 Standard Edition.

请我提供有关如何附加数据库以及连接字符串的外观的准则.

谢谢

Good day everyone.
I am working on an ASP.NET Project. I think this is the first time that i will be designing an application that will not run on the localhost (it will be hosted on the internet), i am trying to attach a database to the app_data folder but it is generating an error. I am running VS2010 Professional Edition and SQL Server 2005 Standard Edition.

Please i need a guideline on how to attach the Database and what the connection string will look like.

Thanks

推荐答案

如果您想学习正确地做,然后将应用程序分成几层,不要将databsae附加到Web应用程序.创建一个数据访问项目并使用它.

您可以在此处 [ ^ ]
If you want to learn to do it properly then seperate the application into layers, don''t attach the databsae to the Web Application. Create a data access project and use it instead.

You find information about connection strings here[^]


这篇关于App_Data数据库附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆