dotConnect for Google BigQuery Documentation
Devart.Data.BigQuery Namespace / BigQueryException Class
Members Example

On this page
    BigQueryException Class
    On this page
    The exception that is generated when Google BigQuery returns an error.
    Syntax
    Remarks
    This class is created whenever dotConnect for Google BigQuery encounters an error generated by the server, or BigQueryConnection has been closed before attempting to execute an operation on the server.
    Example
    The following example generates a BigQueryException due to a non-existing table, and then displays the exception.
    public void ThrowBigQueryException()
    {
      string mySelectQuery = "SELECT * FROM NONEXISTINGTABLE";
      BigQueryConnection bigQueryConnection =
        new BigQueryConnection(
            @"Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********");
      BigQueryCommand bigQueryCommand = new BigQueryCommand(mySelectQuery,bigQueryConnection);
      try
      {
        bigQueryCommand.Connection.Open();
      }
      catch (BigQueryException myException)
      {
        MessageBox.Show("Message: " + myException.Message + "\n");
      }
    }
    Public Sub ThrowBigQueryException()
      Dim mySelectQuery As String = "SELECT * FROM NONEXISTINGTABLE"
      Dim bigQueryConnection As New BigQueryConnection( _
        "Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********")
      Dim bigQueryCommand As New BigQueryCommand(mySelectQuery, bigQueryConnection)
      Try
        bigQueryCommand.Connection.Open()
      Catch myException As BigQueryException
        MessageBox.Show("Message: " + myException.Message + ControlChars.Cr)
      End Try
    End Sub
    Inheritance Hierarchy

    System.Object
       System.Exception
          System.SystemException
             System.Runtime.InteropServices.ExternalException
                System.Data.Common.DbException
                   Devart.Data.BigQuery.BigQueryException

    See Also