Solved

The underlying provider failed on Open.

Posted on 2010-11-15
2
1,806 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

785 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