Try changing Tools > Options > Database Tools > Data Connections > SQL Server Instance Name . The default for VS2013 is (LocalDB)\v11. 0 . Changing to (LocalDB)\MSSQLLocalDB , for example, seems to work - no more version 782 error.
Try changing Tools > Options > Database Tools > Data Connections > SQL Server Instance Name.
The default for VS2013 is (LocalDB)\v11.0
.
Changing to (LocalDB)\MSSQLLocalDB
, for example, seems to work - no more version 782 error.
Try to change the compatibility level, worked for me.
Verify what level it is
USE VJ_DATABASE;
GO
SELECT compatibility_level
FROM sys.databases WHERE name = 'VJ_DATABASE';
GO
Then make it compatible with the older version
ALTER DATABASE VJ_DATABASE
SET COMPATIBILITY_LEVEL = 110;
GO
By default, Sql Server 2014 will change the db versions compatibility to only 2014, using the @@ version
you should be able to tell, which version Sql Server is.
Then run the command above to change it the version you have.
Additional step: Ensure you look at the accessibility of the DB is not reset, do this by right clicking on properties of the folder and the database. (make sure you have rights so you don't get an access denied)
For me using solution provided by codedom did not worked. Here we can only changed compatibility version of exiting database.
But actual problem lies that, internal database version which do not matches due to changes in there storage format.
Check out more details about SQL Server version and their internal db version & Db compatibility level here So it would be good if you create your database using SQL Server 2012 Express version or below. Or start using Visual Studio 2015 Preview.
This solution solve my problem: (from: https://msdn.microsoft.com/en-us/library/ms239722.aspx)
To permanently attach a database file (.mdf) from the Data Connections node
Open the shortcut menu for Data Connections and choose Add New Connection.
The Add Connection dialog box appears.
Choose the Change button.
The Change Data Source dialog box appears.
Select Microsoft SQL Server and choose the OK button.
The Add Connection dialog box reappears, with Microsoft SQL Server (SqlClient) displayed in the Data source text box.
In the Server Name box, type or browse to the path to the local instance of SQL Server. You can type the following:
For information about SQL Server Express LocalDB and SQL Server Express, see Local Data Overview.
Select either Use Windows Authentication or Use SQL Server Authentication.
Choose Attach a database file, Browse, and open an existing .mdf file.
Choose the OK button.
The new database appears in Server Explorer. It will remain connected to SQL Server until you explicitly detach it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With