dotConnect for Zoho CRM Documentation
Devart.Data.Zoho Namespace / ZohoConnection Class / ConnectionString Property
Example

In This Topic
    ConnectionString Property (ZohoConnection)
    In This Topic
    Gets or sets the string used to open a Zoho CRM connection.
    Syntax
    'Declaration
     
    Public Shadows Property ConnectionString As String
    public new string ConnectionString {get; set;}

    Property Value

    The connection string that includes the parameters needed to establish the initial connection. The default value is an empty string ("").
    Remarks
    When ConnectionString property is assigned a value, connection closes. Many of the connection string values have corresponding properties. When the connection string is set, all of these properties are updated, except when an error is detected. In this case, none of the properties are updated. ZohoConnection properties return only those settings contained in the ConnectionString.

    Resetting the ConnectionString on a closed connection resets all connection string values (and related properties).

    The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as System.ArgumentException, is generated. Other errors can be found only when an attempt is made to Open the connection.

    The ConnectionString is similar to an OLE DB connection string. Values may be delimited by single or double quotes, (for example, name='value' or name="value"). Either single or double quotes may be used within a connection string by using the other delimiter, for example, name="value's" or name= 'value"s', but not name= 'value's' or name= ""value"". All blank characters, except those placed within a value or within quotes, are ignored. Keyword value pairs must be separated by a semicolon (;). If a semicolon is part of a value, it also must be delimited by quotes. No escape sequences are supported. The value type is irrelevant. Names are not case sensitive. Arguments names may occur only once in the connection string.

    The following table lists the valid names for values within the ConnectionString.

    Name Description
    Connection Lifetime When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. The default value is 0 (connection always returns to pool).
    Connect Timeout -or- Connection Timeout The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 15.
    Default Command Timeout The time in seconds to wait while trying to execute a command before terminating the attempt and generating an error. A value of 0 indicates no limit.
    Domain Zoho CRM domain to connect to: crm.zoho.com or crm.zoho.eu or crm.zoho.com.cn or crm.zoho.in or crm.zoho.com.au.
    Initialization Command Specifies a data source-specific command that should be executed immediately after establishing the connection.
    Max Pool Size The maximum number of connections allowed in the pool. Setting the Max Pool Size value of the ConnectionString can affect performance. The default value is 100.
    Min Pool Size The minimum number of connections allowed in the pool. The default value is 0.
    Persist Security Info Indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.
    Pooling If true, by default, the ZohoConnection object is drawn from the appropriate pool or is created and added to the appropriate pool.
    Proxy Host The host name or IP address of proxy server.
    Proxy Password The password for the proxy server account.
    Proxy Port The port number of the proxy server. The default value is 3128.
    Proxy User The proxy server account name.
    Run Once Command A command to execute when the connection is opened the first time and not executed when the connection is taken from the pool.
    Readonly Determines whether the connection is read-only (allows only SELECT statements).
    Refresh Token Zoho CRM OAuth refresh token, used for connecting via API v2.
    Security Token The automatically generated key that is used for logging in to Zoho CRM from an untrusted network. Used for connecting via API v2.
    Token Server The location to store OAuth 2.0 refresh tokens between sessions. Can be a file on disk or a registry key. For example, "Token Server=file://D:\\temp\\QuickBooks_oauth_token_1234.txt" or "Token Server=reg://HKEY_CURRENT_USER\\Software\\Devart\\QuickBooks\\OAuth_12345".
    Trigger Workflow Determines whether to trigger the workflow rule when inserting or updating data.
    Use Display Name For Custom Tables Determines whether display names are used to access custom Zoho CRM modules and are returned by the provider instead of the module names.
    UTC Dates Indicates whether all the datetime values retrieved from the data source are returned as UTC values or converted to local time, and whether date values, specified on the application side (for example, in SQL statements) are considered UTC or local. Default value is false.
    Zoho Time Zone The timezone that is specified in your Zoho CRM account settings.
    Example
    The following example creates a ZohoConnection and sets some of its properties in the connection string.
    public void CreateZohoConnection()
    {
      string myConnString1 = 
         "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0";
      ZohoConnection zohoConnection1 = new ZohoConnection(myConnString1);
      zohoConnection1.Open();
    }
    Public Sub CreateZohoConnection()
      Dim myConnString1 As String = _
          "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0"
      Dim zohoConnection1 As New ZohoConnection(myConnString1)
      zohoConnection1.Open()
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also