Connection not closed?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
ConiKost
Posts: 5
Joined: Thu 24 Nov 2005 08:49

Connection not closed?

Post by ConiKost » Fri 25 Nov 2005 09:04

Hello!
I want, that after a successfull select the connection is going to be closed.
So i used

Code: Select all

pgReader.Close()
pgConnection.Close()
But my PostgreSQL Server reports that a connection is still in use ... only when i quit the hole programm my servers doen`t show this connection any more.

Wheres the Problem ?

SecureGen
Devart Team
Posts: 133
Joined: Thu 08 Sep 2005 06:27

Post by SecureGen » Fri 25 Nov 2005 09:41

It is because of connection pooling functionality which is ON by default. Such behavior is standard for ADO.NET data providers. If you do not need connection pooling you can add ";pooling=false" option to connection string.

ConiKost
Posts: 5
Joined: Thu 24 Nov 2005 08:49

Post by ConiKost » Fri 25 Nov 2005 10:51

Perfect!
Thanks for Help!

Everything is working now :)

Post Reply