Npgsql Api Docs |

# NpgsqlConnection.ConnectionString Property

Gets or sets the string used to connect to a PostgreSQL database. Valid values are:

- Server: Address/Name of Postgresql Server;
- Port: Port to connect to;
- Protocol: Protocol version to use, instead of automatic; Integer 2 or 3;
- Database: Database name. Defaults to user name if not specified;
- User Id: User name;
- Password: Password for clear text authentication;
- SSL: True or False. Controls whether to attempt a secure connection. Default = False;
- Pooling: True or False. Controls whether connection pooling is used. Default = True;
- MinPoolSize: Min size of connection pool;
- MaxPoolSize: Max size of connection pool;
- Timeout: Time to wait for connection open in seconds. Default is 15.
- CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20.
- Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values.
- ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15.
- SyncNotification: Specifies if Npgsql should use synchronous notifications.
- SearchPath: Changes search path to specified and public schemas.

[Visual Basic]
Overrides Public Property ConnectionString As String _
Implements IDbConnection.ConnectionString
[C#]
public override string ConnectionString {get; set;}

#### Property Value

The connection string that includes the server name, the database name, and other parameters needed to establish the initial connection. The default value is an empty string.

#### Implements

IDbConnection.ConnectionString

#### See Also

NpgsqlConnection Class | Npgsql Namespace