How do I use the pooling features?

How do I use the pooling features?

Postby tabsautobiz » Wed 22 Jun 2011 21:46

I'm currently creating a wcf service that will perform frequent selects on a database.

Currently I'm looking at something like this:
Code: Select all
Public Function GetInfo() as string
    Dim connection As New PgSqlConnection(connectionString)
    Dim command As New PgSqlCommand("SELECT * FROM TABLE", connection)
    Dim reader As PgSqlDataReader = command.ExecuteReader
    While reader.Read
      'do something with the data
    End While
    Return "Done"
End Function

Would this code transparently use the built-in connection pooling, or do I need to use a different approach?
Posts: 5
Joined: Wed 08 Jun 2011 18:33

Postby Shalex » Thu 23 Jun 2011 07:08

Usage of the connection pooling depends on the Pooling connection string parameter. The default value: Pooling=true.
For more information, please refer to
Devart Team
Posts: 7888
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for PostgreSQL