Connection Property (SnowflakeCommand)
Gets or sets the
SnowflakeConnection used by this instance of the
SnowflakeCommand.
Property Value
The connection to a data source. The default value is a null reference.
The following example creates a
SnowflakeCommand and sets some of its properties.
|
|---|
public void CreateCommand()
{
string mySelectQuery = "SELECT * FROM your_database.your_schema.employees ORDER BY id";
SnowflakeCommand snowflakeCommand = new SnowflakeCommand(mySelectQuery);
snowflakeCommand.Connection = new SnowflakeConnection(
"Domain=myorg-myaccount.snowflakecomputing.com;User=your_user;Password=********;Database=your_database;Schema=your_schema;Warehouse=your_warehouse;License Key=**********");
snowflakeCommand.CommandType = System.Data.CommandType.Text;
} |
|
|---|
Public Sub CreateCommand()
Dim mySelectQuery As String = _
"SELECT * FROM your_database.your_schema.employees ORDER BY id"
Dim snowflakeCommand As New SnowflakeCommand(mySelectQuery)
snowflakeCommand.Connection = New SnowflakeConnection( _
"Domain=myorg-myaccount.snowflakecomputing.com;User=your_user;Password=********;Database=your_database;Schema=your_schema;Warehouse=your_warehouse;License Key=**********")
snowflakeCommand.CommandType = System.Data.CommandType.Text
End Sub |