Collation プロパティ
データベースで使用される既定の照合順序を取得します。値の設定も可能です。
名前空間: Microsoft.SqlServer.Management.Smo
アセンブリ: Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)
構文
'宣言
<SfcPropertyAttribute(SfcPropertyFlags.Expensive)> _
Public Property Collation As String
Get
Set
'使用
Dim instance As Database
Dim value As String
value = instance.Collation
instance.Collation = value
[SfcPropertyAttribute(SfcPropertyFlags.Expensive)]
public string Collation { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Expensive)]
public:
virtual property String^ Collation {
String^ get () sealed;
void set (String^ value) sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.Expensive)>]
abstract Collation : string with get, set
[<SfcPropertyAttribute(SfcPropertyFlags.Expensive)>]
override Collation : string with get, set
final function get Collation () : String
final function set Collation (value : String)
プロパティ値
型: System. . :: . .String
照合順序の名前を示す String 値。
実装
説明
利用可能な照合順序文字列の詳細については、「SQL Server 照合順序の選択」を参照してください。また、EnumCollations メソッドの実行時や、SQL Server のセットアップ時にも、利用可能な照合順序文字列を確認することができます。照合順序文字列には、コード ページ、大文字と小文字の区別、アクセントの区別、言語や文字体系などの情報が含まれます。
使用例
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")
'Display the current default collation.
Console.WriteLine(db.Collation)
'Display the case-sensitivity of the current collation.
Console.WriteLine("Collation is case-sensitive = " + _
db.CaseSensitive.ToString)