Database Reference
In-Depth Information
}
}
}
static void Main(string[] args) {
ConnectionBuilder builder = new
ConnectionBuilder();
// Set this to the name of the ODBC dns you
created:
builder.Dsn = "bigquery1";
// This is the default project that will be used
to resolve tables
// in the job:
builder.Catalog = "publicdata";
// Set this to your own project ID so that Jobs
are run under
// this project:
builder.ExecCatalog = "bigquery-e2e";
string state = "creating connection";
try {
state = "opening connection";
using (OdbcConnection connection =
builder.Build()) {
connection.Open();
state = "creating command";
using (OdbcCommand command =
connection.CreateCommand()) {
command.CommandText = Query;
state = "running query";
using (OdbcDataReader reader =
command.ExecuteReader()) {
PrintResults(reader);
}
}
}
} catch (Exception ex) {
System.Console.WriteLine("Error {0}: {1}",
Search WWH ::




Custom Search