locked
The underlying provider failed on Open. RRS feed

  • Question

  • I've had an exception occur on a couple of different, unrelated projects which have come from either book code or Web tutorial code. It is around the Entity Framework and says:

    Entity Exception
    The underlying provider failed on Open.

    I 1st thought there might be something wrong with my PC, but I get the same errors with those projects on my laptop.

    I changed the DataConnectionString to point at my local database in those projects.

    I did up a quick fresh project with an Entity Data model and it worked fine.

    So I am at a loss as to why these projects are failing.

    Any clue?

     

    Sunday, June 13, 2010 8:52 AM

Answers

  • Hello,

    Would you please provide us more information? Can you please post your connection string here? You could open your connection manually using:

    // explicitly open the connection.   
    context.Connection.Open();
    // do other stuff ...

    Regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Thursday, June 17, 2010 9:07 AM