Connection Property (BigcommerceCommand)
Gets or sets the
BigcommerceConnection used by this instance of the
BigcommerceCommand.
Property Value
The connection to a data source. The default value is a null reference.
The following example creates a
BigcommerceCommand and sets some of its properties.
|
|---|
public void CreateCommand()
{
string mySelectQuery = "SELECT * FROM customers ORDER BY id";
BigcommerceCommand bigcommerceCommand = new BigcommerceCommand(mySelectQuery);
bigcommerceCommand.Connection = new BigcommerceConnection(
"Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;");
bigcommerceCommand.CommandType = System.Data.CommandType.Text;
} |
|
|---|
Public Sub CreateCommand()
Dim mySelectQuery As String = _
"SELECT * FROM customers ORDER BY id"
Dim bigcommerceCommand As New BigcommerceCommand(mySelectQuery)
bigcommerceCommand.Connection = New BigcommerceConnection( _
"Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;")
bigcommerceCommand.CommandType = System.Data.CommandType.Text
End Sub |