Proprietà QuotedIdentifierStatus

Ottiene o imposta un valore della proprietà Boolean che specifica se gli identificatori delimitati da virgolette doppie sono parole chiave riservate di Transact-SQL o includono caratteri normalmente non consentiti in base alle regole di sintassi di Transact-SQL.

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
Public Property QuotedIdentifierStatus As Boolean
    Get
    Set
'Utilizzo
Dim instance As Table
Dim value As Boolean

value = instance.QuotedIdentifierStatus

instance.QuotedIdentifierStatus = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)]
public bool QuotedIdentifierStatus { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Design)]
public:
virtual property bool QuotedIdentifierStatus {
    bool get () sealed;
    void set (bool value) sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
abstract QuotedIdentifierStatus : bool with get, set
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
override QuotedIdentifierStatus : bool with get, set
final function get QuotedIdentifierStatus () : boolean
final function set QuotedIdentifierStatus (value : boolean)

Valore proprietà

Tipo: System. . :: . .Boolean
Valore Boolean che specifica come vengono gestiti gli identificatori delimitati per la tabella.
Se True, gli identificatori delimitati vengono utilizzati per consentire caratteri generalmente non consentiti dalle regole di sintassi di Transact-SQL.
Se False (impostazione predefinita), gli identificatori delimitati vengono utilizzati per specificare parole chiave riservate di Transact-SQL.

Implementa

ITableOptions. . :: . .QuotedIdentifierStatus

Esempi

The following code example gets and displays the quoted identifier status of each table in the AdventureWorks2008R2 database.

C#

Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];

foreach (Table tb in db.Tables) 
{
   if (tb.QuotedIdentifierStatus == true)
   {
      Console.WriteLine("Quoted identifiers in " + tb.Name + " may be used to allow characters that are normally prohibited by 
                         SQL syntax rules.");
   }
   else
   {
      Console.WriteLine("Quoted identifiers in " + tb.Name + " can only be used to specify reserved SQL keywords.");
   }
}

Powershell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")

Foreach ($tb in $db.Tables) 
{
   if ($tb.QuotedIdentifierStatus -eq $TRUE)
   {
      Write-Host "Quoted identifiers in" $tb.Name "may be used to allow characters that are normally prohibted by SQL syntax 
                  rules."
   }
   else
   {
   Write-Host "Quoted identifiers in" $tb.Name "can only be used to specify reserved SQL keywords."
   }
}