underlying provider error

Jun 4, 2010 at 6:21 AM

Hi There,

I tried running the completed project (from the download code) and got the following error message at line 36 of RepeaterItemsList.DataBind() upon running the project (F5) :

The underlying provider failed on Open.

Any ideas how to resolve this. I'm guessing I've fogotten to configure something. I'm using the 2005 version of sql server express to run the local mdf file. As you'll see from that line of code, it is the Commerce.mdf file which is the issue as that LINQ-to-Entities statement is in a using block for a CommerceEntities object.

Jun 13, 2010 at 6:08 AM
This is a repeatable error. I loaded the project on my laptop and got the same error. Also, trying to get around it, I attempted to attach the Commerce.mdf file to SQL Server 2008. Unfortunately, the file path for that file includes the name "Joe Stagner", so I cannot attach in that way. Any ideas?
Jul 8, 2010 at 3:58 PM

I'm getting the same error, Joe?

Jul 8, 2010 at 5:03 PM

Looks like I got this working by manually attaching the .mdf to (local)\SQLExpress using the name Commerce.mdf as specified in the web.config

Jul 8, 2010 at 5:41 PM

Hello Joe;

It is working just fine for me, right from the start

if it is ok by you Joe

I am trying to do a VB.Net version of it, but it is going slow because of other activities.

I'll post it up after testing.


Jul 12, 2010 at 11:12 AM
Edited Jul 12, 2010 at 11:13 AM
DaveMassy, Top work! I had to install SQL Server Express 2008. My problem was that I only had SQL Server Express 2005 installed. After attaching it as you suggested, it works like a charm. Thanks very much!
Jul 12, 2010 at 4:21 PM

Hi all;

It is really a good practice to uninstall all earlier versions and use the web installer

for VWD 2010 which in turn will install a fresh sql server 2008 express.

that is what I used for the Spyworks and it worked just fine as I mentioned before.

I know it is a hastle to uninstall and install stuff but it is worth it.

Although I am working on the VB version but I kinda got stuck with the GetTotal function which I found out that

it is not very flexible as the one in the C# version, well I am gonna try to iterate through the whole cart and add the totals

In VB, however,  MyCart can calculate the First , FirstOrDefault values or the Last , LastOrDefault and that only works for one row only.

If any has an idea regarding how to tackle this step in an easier way, then please do give a reply.

I get the feeds from this thread automatically.


Jul 14, 2010 at 6:33 PM

Well, An update on the progress for the VB version

I finally got the CartTotal to work just as it should, and now tackling the rest of the methods.