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

Quoted Property (DbDataTable)
Gets or sets whether the DbDataTable quotes all the names of data source objects.
Syntax
'Declaration
 
Public Property Quoted As Boolean
 

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
See Also