Views: 49K
Replies: 2
Archived
|
Need some help with "The underlying provider failed on Open"Can anybody help me on this issue? I set the ASP.NET Web application as start project and used the default setting for database connection. When trying to browse the product, I get the following error "The underlying provider failed on Open." at the highlighted line below: public List<Product> GetProductsByCategory(int categoryId, string sortExpression) { using (var context = DataObjectFactory.CreateContext()) { // Load single Category with all Product child records var category = context.CategoryEntities.Include("Products") .FirstOrDefault(c => c.CategoryId == categoryId); // Order by (using dynamic linq) without going back to db var products = category.Products.AsQueryable().OrderBy(sortExpression, null); // Return list of business objects return products.Select(p => Mapper.Map(p)).ToList(); } } I am running this project using VS 2010 Professional on Windows Vista. Thanks. Steven Cai, Mar 12, 2011
|
|
Reply 1Thanks to the author..Best article...Here is my discussion on MSSQL underlying provider fialed error! Please visit!
http://www.wikitechy.com/fix-error/mssql-error-the-underlying-provider-failed-on-open Venkat J, Jun 11, 2016
|
|
Reply 2Steven:
Here is a discussion on the same error: http://stackoverflow.com/questions/2475008/the-underlying-provider-failed-on-open From reading this article I suspect it is related to a MSDTC setting on your machine. I hope this gets you going. Dan McMillan, Mar 12, 2011
|