Gets or sets the string used to open the connection.

Namespace: Gronewold.SphinxConnector.SphinxQL
Assembly: Gronewold.SphinxConnector (in Gronewold.SphinxConnector.dll) Version: 2.8.0.26312 (2.8.0.26312)

Syntax

C#
public override string ConnectionString { get; set; }
Visual Basic
Public Overrides Property ConnectionString As String
	Get
	Set

Field Value

Return Value

The connection string used to establish the initial connection. The default value is an empty string.

Implements

IDbConnection..::..ConnectionString

Remarks

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.
KeywordDefaultDescription
Datasource
-or-
Data Source -or-
Host
localhostSpecifies the name of the host or the IP address to connect to.
Port9306Specifies 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
0Specifies the mininum number of connections which should be created upon initialization of the connection pool.
Max Pool Size
-or-
MaxPoolSize
20Specifies 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
15Specifies the time (in seconds) to wait while establishing a connection before terminating the attempt and generating an error.
EnlisttrueSpecifies whether connections should automatically enlist in an ambient Transaction.
Supports Ping
-or-
SupportsPing
falseSpecifies whether the version of Sphinx to connect to supports the ping command. As of revision 2312 of Sphinx 1.10.1 the ping command is officially supported. This is detected automatically by SphinxConnector.NET and this option will be ignored in that case.
Encodingutf-8 Specifies the encoding to use when sending queries or retrieving results from Sphinx.

Exceptions

ExceptionCondition
System..::..InvalidOperationException Occurs when trying to change the connection string of an open connection.

See Also