Npgsql API Documentation |

# NpgsqlConnection.ConnectionString Property

[This is preliminary documentation and subject to change.]

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: 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; Encoding: Encoding to be used; Timeout: Time to wait for connection open in seconds.

[Visual Basic]
<RefreshProperties(RefreshProperties=(RefreshProperties.All))>
<RecommendedAsConfigurable(RecommendedAsConfigurable=True)>
<DefaultValue(Value="")>
<Category(Category="Data")>
<Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="Npgsql.Design.ConnectionStringEditor, Npgsql, Version=0.7.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7")>
NotOverridable Public Property ConnectionString As String Implements _
IDbConnection.ConnectionString
[C#]
[RefreshProperties(RefreshProperties=(RefreshProperties.All))]
[RecommendedAsConfigurable(RecommendedAsConfigurable=True)]
[DefaultValue(Value="")]
[Category(Category="Data")]
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="Npgsql.Design.ConnectionStringEditor, Npgsql, Version=0.7.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7")]
public 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