Connection must be opened

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 10
Joined: Mon 06 Dec 2010 18:15

Connection must be opened

Post by betawarz » Tue 07 Jan 2014 17:32


I've been using dotConnect for several years. I'm encountering an issue that I just can't seem to resolve. I'm using dotConnect for Postgres v6.8.333, ASP.NET MVC4 and Entity Framework 6. I've been using this software stack for months without any issues. Suddenly, two days ago, my project's unit tests fail while trying to interact with my Postgres server, with an error that says "The connection must be opened."

What's real strange though is that the connection seems to work while EF6 is creating the schema from scratch, because it will connect and create all of the tables just fine. It can even connect and select records and delete records during a my unit tests init and cleanup phase. Once I hit an actual test and try to insert or modify a record, it says the connection must be opened.

This literally worked the prior day (and months), and then without any code changes it's now throwing this error. So, I don't think it's necesarilly anything code related or dotConnect bug, but perhaps it's something that somebody on here might be able to think of a reason why this could be happening?

I can't think of any real way to debug this.

Site Admin
Posts: 8246
Joined: Thu 14 Aug 2008 12:44

Re: Connection must be opened

Post by Shalex » Wed 08 Jan 2014 11:50

A similar problem was fixed in the 7.1.45 build of dotConnect for PostgreSQL: ... story.html. We recommend using the latest (7.2.65) version of the provider. Please upgrade and notify us about the result.

Post Reply