dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlSelectStatement Class / Clear Method
Example

In This Topic
    Clear Method (MySqlSelectStatement)
    In This Topic
    Clears all parts of the MySqlSelectStatement.
    Syntax
    'Declaration
     
    Public Overrides NotOverridable Sub Clear() 
    public override void Clear()
    Remarks
    Call MySqlSelectStatement to empty all properties of the MySqlSelectStatement object.
    Example
    The following example demonstrates how to use the Clear method.
    private void RefreshStatement(MySqlSelectStatement 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 MySqlSelectStatement)
      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
    See Also