dotConnect for Oracle Documentation
Devart.Common Namespace / DbDataTable Class / Quoted Property
Example

In This Topic
    Quoted Property (DbDataTable)
    In This Topic
    Gets or sets whether the DbDataTable quotes all the names of data source objects.
    Syntax
    'Declaration
     
    Public Property Quoted As Boolean
    public bool Quoted {get; set;}

    Property Value

    true if the DbDataTable will quote all the names of data source objects; otherwise, false. The default value is false.
    Remarks
    Names of data source objects can contain any characters, including spaces, commas, national or lowercase characters. To accommodate this, use the Quoted property that allows enclosing of all objects names by quotation mark in generated SQL statements.
    Example
    The following example demonstrates how to use the Quoted property.
    static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {
    
      myDataTable.Connection = myConnection;
      myDataTable.SelectCommand = myConnection.CreateCommand();
      myDataTable.SelectCommand.CommandText = "SELECT * FROM \"DeptMixedCase\"";
      myDataTable.Quoted = true;
      myDataTable.FetchAll = true;
      myDataTable.CachedUpdates = false;
      myDataTable.Open();
      DataRow row = myDataTable.Rows[0];
      row[myDataTable.Columns["DNAME"]] = "Departament1";
      myDataTable.Update();
      myDataTable.Close();
    }
    Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
      myDataTable.Connection = myConnection
      myDataTable.SelectCommand = myConnection.CreateCommand
      myDataTable.SelectCommand.CommandText = "SELECT * FROM ""DeptMixedCase"""
      myDataTable.Quoted = True
      myDataTable.FetchAll = True
      myDataTable.CachedUpdates = False
      myDataTable.Open()
      Dim row1 As DataRow = myDataTable.Rows.Item(0)
      row1.Item(myDataTable.Columns.Item("DNAME")) = "Departament1"
      myDataTable.Update()
      myDataTable.Close()
    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