Sphinx QLConnectionConnection String Property
Gets or sets the string used to open the connection.
Definition
Namespace: SphinxConnector.SphinxQL
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
The connection string used to establish the initial connection. The default value is an empty string.
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
public override string ConnectionString { get; set; }VB
Public Overrides Property ConnectionString As String
Get
SetProperty Value
StringReturn Value
StringThe connection string used to establish the initial connection. The default value is an empty string.
Implements
IDbConnectionConnectionStringRemarks
An empty connection string will cause the default values to be used.
- Connection string options must be seperated by a semicolon (;).
- Connection string options are not case sensitive.
- If an option appears several times, the last value will be used.
| Keyword | Default | Description |
|---|---|---|
| Datasource -or- Data Source -or- Host | localhost | Specifies the name of the host or the IP address to connect to. |
| Port | 9306 | Specifies to which port on the host to connect to. |
| Pooling | 'false' | Indicates whether to enable pooling of SphinxQL connections. Note that pooling will only work with Sphinx 1.10.1 and above. Also make sure that the workers option in your sphinx.conf is not set to none. |
| Min Pool Size -or- MinPoolSize | 0 | Specifies the mininum number of connections which should be created upon initialization of the connection pool. |
| Max Pool Size -or- MaxPoolSize | 20 | Specifies the maxinum number of connections allowed a connection pool. If this number is reached and all connections are in use, an exception is thrown. |
| Connection Timeout -or- Connect Timeout | 15 | Specifies the time (in seconds) to wait while establishing a connection before terminating the attempt and generating an error. |
| Enlist | true | Specifies whether connections should automatically enlist in an ambient Transaction. |
| Encoding | utf-8 | Specifies the encoding to use when sending queries or retrieving results from Sphinx. |
Exceptions
| InvalidOperationException | Occurs when trying to change the connection string of an open connection. |