开发者

Database connection fails

开发者 https://www.devze.com 2023-01-26 15:34 出处:网络
I have written c# application that uses mdf file for database.when i make setup of that project and runs on other computer having dotnetframework and sql server compact 3.5 then id dose not runs and e

I have written c# application that uses mdf file for database.when i make setup of that project and runs on other computer having dotnetframework and sql server compact 3.5 then id dose not runs and exception is shown saying something sql server not found or 开发者_如何学运维not ready for connection something like that what should i do

Database connection fails


mdf is not for sql server compact edition, it is for the real sql server. You need to deploy it to Sql Server Express edition or higher.

Edit:
You can install SQL server express edition or if you want to use the sql compact server you need to create a "local database" in visual studio.

When adding a mdf-database to your visual studio project is is attached to your local sql express database server behind the scenes when you start your project.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号