'Declaration Public Shadows Property ConnectionString As String
public new string ConnectionString {get; set;}
'Declaration Public Shadows Property ConnectionString As String
public new string ConnectionString {get; set;}
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 |
---|---|
API Version | Determines the BigCommerce API version to use to interact with BigCommerce - v2 or v3. Note that BigCommerce API v3 does not support all the BigCommerce objects. Even if you use APIVersion.v3 in your connection, access to some objects is still performed via API v2. Besides the lists of objects and their structure is different for BigCommerce API v2 and API v3. See BigcommerceConnectionStringBuilder.APIVersion for more information. |
API Version | Determines the BigCommerce API version to use: v2 or v3. |
Access Token | The BigCommerce access token for OAuth authentication. |
Authentication Token | The automatically generated key that is used for connecting to BigCommerce. |
Authentication Type | Determines the authentication method to use: username/password or app center client. Supported values are Basic and OAuth. See AuthenticationType for more information. |
Client ID | The BigCommerce client id for OAuth authentication. |
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. |
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 BigcommerceConnection 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). |
Store Id | The id of your BigCommerce store. For OAuth authentication. |
Server | The path where all XML requests to Bigcommerce should be sent. |
Use Custom Fields | Determines whether you will be able to get product custom fields via the CustomFields field of the Products object through this connection. Applicable only for BigCommerce API v3 connections. Does not affect working with custom fields for customers and customer addresses, and it also does not affect access to product custom fields via the ProductCustomFields object. |
User Id | The user name to login with. |
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. |
public void CreateBigcommerceConnection() { string myConnString1 = "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;"; BigcommerceConnection bigcommerceConnection1 = new BigcommerceConnection(myConnString1); bigcommerceConnection1.Open(); }
Public Sub CreateBigcommerceConnection() Dim myConnString1 As String = _ "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;" Dim bigcommerceConnection1 As New BigcommerceConnection(myConnString1) bigcommerceConnection1.Open() End Sub
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