Propriedade do RDL Table.ID
Gets the ID value that uniquely identifies the table.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)
Sintaxe
'Declaração
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ID As Integer
Get
'Uso
Dim instance As Table
Dim value As Integer
value = instance.ID
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public int ID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
virtual property int ID {
int get () sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
abstract ID : int
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
override ID : int
final function get ID () : int
Valor da propriedade
Tipo: System.Int32
An Int32 value that specifies the ID value that uniquely identifies the table.
Implementa
Exemplos
The following code example shows how to list the ID value of each table in the AdventureWorks2012 database.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];
foreach (Table tb in db.Tables)
{
Console.WriteLine("The ID of the " + tb.Name + " table is " + tb.ID.ToString());
}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")
Foreach ($tb in $db.Tables)
{
Write-Host "The ID of the" $tb.Name "table is" $tb.ID
}
Consulte também
Referência
Namespace Microsoft.SqlServer.Management.Smo