PgSqlCommand.ParameterCheck & Connection must be opened

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 1
Joined: Wed 21 Apr 2010 11:45

PgSqlCommand.ParameterCheck & Connection must be opened

Post by g.boichot » Mon 26 Apr 2010 10:30


I have dotConnect for PostgreSQL 4.65 PRO.
I have a stored procedure that takes about 10 minutes to execute.

Here is my code :

Code: Select all

PgSqlParameter p1 = new PgSqlParameter("Param1", PgSqlType.VarChar, 10);
p1.Value = "a";
PgSqlParameter p2 = new PgSqlParameter("Param2", PgSqlType.VarChar, 10);
p2.Value = "b";

PgSqlCommand MyCommande = new PgSqlCommand("MyStoredProcedure", MyConnection);
MyCommande.CommandType = CommandType.StoredProcedure;
MyCommande.CommandTimeout = 900;
MyCommande.ParameterCheck = true;
If I set the PgSqlCommand.ParameterCheck to true to be sure to reorder the parameter in the right way , I obtain an error "Connection must be opened" after 30 sec.

If I don't set the PgSqlCommand.ParameterCheck to true, the stored procedure executes correctly in about 10 minutes.

I reproduce the same error using 4.90.120 Trial.

Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 27 Apr 2010 10:07

Please send us the definition of a stored procedure with which the problem can be reproduced. We failed to reproduce it with simple procedures. Also, please specify the version of PostgreSQL server you are using.

Post Reply