Can't connect to database from file

前端 未结 3 1864
北荒
北荒 2020-12-10 13:52

I try to connect through: Microsoft SQL Server Database File (SqlClient), but I recieve error:

The attempt to attach to the database failed with the f

相关标签:
3条回答
  • 2020-12-10 14:21

    You need the SQL Server Express LocalDB add-on, you can get it from here in both x86 & amd64 versions.

    0 讨论(0)
  • 2020-12-10 14:25

    I had faced same issue when I deployed my software on test machine.
    Solution:

    1. Check the SQL server version using which the .mdf was build. If you don't know execute command SELECT @@VERSION.
    2. Install correct version of SqlLocalDB.msi from following link.
      http://www.microsoft.com/en-us/download/details.aspx?id=29062 http://www.microsoft.com/en-my/download/details.aspx?id=42299.
    0 讨论(0)
  • 2020-12-10 14:34

    Try to use SQL Server Authentication. Make sure that your SQL service is running or not. I think this will help you.

    0 讨论(0)
提交回复
热议问题