dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlSelectStatement Class / Clear Method
Example

In This Topic
    Clear Method (PgSqlSelectStatement)
    In This Topic
    Clears all parts of the PgSqlSelectStatement.
    Syntax
    'Declaration
     
    Public Overrides NotOverridable Sub Clear() 
    public override void Clear()
    Remarks
    Call PgSqlSelectStatement to empty all properties of the PgSqlSelectStatement object.
    Example
    The following example demonstrates how to use the Clear method.
    private void RefreshStatement(PgSqlSelectStatement stmt)
    {
      stmt.Clear();
      stmt.Columns.Add(new SelectColumn("ENAME"));
      stmt.Columns.Add(new SelectColumn("", "emp", "JOB", "j"));
      stmt.Columns.Add(new SelectColumn("test", "", "emp", "HIREDATE", "hd"));
    
      stmt.Tables.Add(new SelectTable("emp"));
    
      //select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
      string queryText = stmt.ToString();
    }
    Private Sub RefreshStatement(ByVal stmt As PgSqlSelectStatement)
      stmt.Clear()
      stmt.Columns.Add(New SelectColumn("ENAME"))
      stmt.Columns.Add(New SelectColumn("", "emp", "JOB", "j"))
      stmt.Columns.Add(New SelectColumn("test", "", "emp", "HIREDATE", "hd"))
      stmt.Tables.Add(New SelectTable("emp"))
      'select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
      Dim queryText As String = stmt.ToString
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also