Solved

The underlying provider failed on Open.

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Obtain cell value using column ID in DataGrid using VB.NET 2 24
vb.net and creating a class 5 20
VB.Net - String Manipulation Scenario 2 24
Code enhancement 4 20
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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