Solved

The underlying provider failed on Open.

Posted on 2010-11-15
2
1,795 Views
Last Modified: 2012-05-10
one of my friends send me this example to learn about entity framework

but it always show me the following error: "The underlying provider failed on Open." in this code:

        Public Function GetAllDepartments() As IEnumerable(Of Department) Implements IDepartmentRepository.GetAllDepartments
            Return Me.context.Departments.ToList()
        End Function

You can find the program in the following link: http://www.grupossc.com/VB.zip

0
Comment
Question by:altariamx2003
2 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 34148309
which version of sql are you running ? if it's sql 2005 then the attached mdf in the source might be 2008 and you may to import in manually..
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 34151841
Looking at the connection string should give you some clue, because I am thinking (without looking) that this is an SQL Server Express edition error.  I had the same problem with NerdDinner example for ASP.NET MVC 2.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now