CreateCommand Method (BigQueryConnection)
Creates and returns a
BigQueryCommand object associated with the
BigQueryConnection.
In this sample
BigQueryCommand object is created. It is automatically associated with
BigQueryConnection that created it.
|
|---|
public void CreateBigQueryCommand(string myConnString)
{
BigQueryConnection bigQueryConnection = new BigQueryConnection(myConnString);
BigQueryCommand bigQueryCommand = bigQueryConnection.CreateCommand();
bigQueryCommand.CommandText = "INSERT INTO your_project.your_dataset.employees (first_name, last_name) VALUES ('John', 'Smith')";
bigQueryConnection.Open();
try
{
bigQueryCommand.ExecuteNonQuery();
}
finally
{
bigQueryConnection.Close();
}
} |
|
|---|
Public Sub CreateBigQueryCommand(ByVal myConnString As String)
Dim bigQueryConnection As New BigQueryConnection(myConnString)
Dim bigQueryCommand As BigQueryCommand = bigQueryConnection.CreateCommand()
bigQueryCommand.CommandText = "INSERT INTO your_project.your_dataset.employees (first_name, last_name) VALUES ('John', 'Smith')"
bigQueryConnection.Open()
Try
bigQueryCommand.ExecuteNonQuery()
Finally
bigQueryConnection.Close()
End Try
End Sub |