• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

connect to .mdf

I'm running Visual Studio 2013 and upgraded for local db to SQLExpress 2014 ver12.

Everytime I try and access a .mdf I get the enclosed error now:

It's like it's tying to find my previous installed express version? How do I switch it in VS2013 to find the correct version of the db?
0
thenrich
Asked:
thenrich
  • 2
  • 2
1 Solution
 
Utkarsh KulkarniSr. Sw EngCommented:
It seems like file path issue.
The SQL server installation folder is different for 2005/2008/2014 express editions.
Default path for SQL 2008 R2 is like "C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA"

Change this to Path to 2014 version folder and it will access the .mdf file.
0
 
thenrichAuthor Commented:
Where do I adjust the path?
0
 
Utkarsh KulkarniSr. Sw EngCommented:
There are following possibilities
1. A app.config has hard coded path to .mdf file

2. Somewhere on the form or in class file, this path has been defined.

Look for ".mdf" in your entire solution & then modify it.
0
 
CodeCruiserCommented:
What error do you get?
0
 
thenrichAuthor Commented:
I just went back to SQL express 2012 and now don't have any problems.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now