Upgrade MS-SQL localDB mdf file from V.11 to V.13 (v. MS SQL 2012 to v. MS SQL 2014)

Target audience: SQL users
Used tools: VS 2015
What’s the purpose: upgrade MS SQL LocalDB from V.11 to V.13

I have an old asp.net project about working with huge excel table which nearly 110 production units have to fulfill every day and send to the central unit of our firm. Then here we have to summarized and book-keeping I made asp.net with 2 html tables – for incomes and expenses After some years and read about GridView control and find a sample for using it : https://github.com/tdykstra/GridView
I downloaded and start it in VS 2015 and received this :

Then have to click OK and when start the project received :

I have to change VS connection string from web.configfile from VS project from :
connectionString=”Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\AdventureWorksLT_Data.mdf;Integrated Security=True;Connect Timeout=30″
to
connectionString=”Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\AdventureWorksLT_Data.mdf;Integrated Security=True;Connect Timeout=30″

because according the MS after v.12 they stopped to count versions of LocalDB and we have to use simply MSSQLLocalDB in connection string of the project. Well, i changed it , save and restart the app – the result was

All is OK !!! But it was little strange – as at my work PC this step – with changing connection string was not enough and i had to do also these steps :

  1. Open Server Explorer in Visual Studio
  2. Click on icon Connect to database – in upper left corner
  3. Choose MS SQL Server from the list
  4. Enter in the box for Server Name : (LocalDB)\MSSQLLocalDB
  5. Select Attach a database file in the options below and browse for AdventureWorksLT_Data.mdf file

It is in folder D:\Projects\GridView-master\GridViewCS\App_Data Then have to confirm conversion of MDF file and the result will be as this from upper picture !!!

Published
Categorized as SQL