Cannot connect to SQL Server Express 2014 from Visual Studio 2012

25,593

I finally found a message in the application event log which pointed out an incompatibility issue... I presumed this was between VS 2012 and SQL Server 2014. Accordingly I installed SQL Server 2012. Subsequently running a 'Web Application' in VS 2012 I found that the 'Register' function in the automatically created page correctly created a user whereas previously it had failed with the error originally posted. I am assuming that all SQL Server related activities in VS 2012 will now work, but will report back here if I find otherwise.

Share:
25,593
user3187383
Author by

user3187383

Updated on July 09, 2022

Comments

  • user3187383
    user3187383 almost 2 years

    My question is regarding retrieving data from SQL Server (Express 2014) into Visual Studio (Professional 2012). I am following a tutorial re usage of the drop down list. When I use 'Choose Data Source' I can proceed as far as selecting the database. When I try to use 'Microsoft SQL Server Database File (SqlClient)' and select 'NORTHWND.MDF' from my App_Data folder I get this error:

    The attempt to attach to the database failed with the following information: A network-related or instance-specific error occurred while establishing an connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections (provider: SQL Network Interfaces, error:50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.)

    I have nothing in the log re this.

    When I try and connect to SQL Server using 'Microsoft SQL Server' I can get to the SQL Server Instance, select the database and get 'Connection Successful' but on OK get this error:

    Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version 11.0.0.0 Culture=neutral, Public Key Token=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

    I have installed SQLLocalDB.

    Help greatly appreciated as this is holding up my studies. Thank you.