SqlProcedureAttribute 클래스

정의

어셈블리의 메서드 정의를 저장 프로시저로 표시하는 데 사용됩니다. 특성의 속성은 SQL Server에 형식을 등록할 때 사용되는 실제 특성을 반영합니다. 이 클래스는 상속될 수 없습니다.

public ref class SqlProcedureAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public sealed class SqlProcedureAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type SqlProcedureAttribute = class
    inherit Attribute
Public NotInheritable Class SqlProcedureAttribute
Inherits Attribute
상속
SqlProcedureAttribute
특성

예제

다음 예제에서는 저장된 프로시저로 특성이 지정 된 어셈블리의 메서드 선언을 보여 줍니다. SqlProcedureAttribute 속성이 저장된 프로시저의 이름으로 설정 되어 있습니다.

[Microsoft.SqlServer.Server.SqlProcedure(Name = "StoredProcSendMessage")]
public static void StoredProcSendMessage()
{
    // Send a message string back to the client.
    SqlContext.Pipe.Send("Hello World!");
}
<Microsoft.SqlServer.Server.SqlProcedure(Name:="StoredProcSendMessage")> _
Public Shared Sub StoredProcSendMessage()

    ' Send a message string back to the client.
    SqlContext.Pipe.Send("Hello world!")

End Sub

설명

SqlProcedureAttribute 자동으로 저장 프로시저로 지정된 된 메서드를 등록 하려면 Microsoft Visual Studio에 의해서만 사용 됩니다. SQL Server에서 사용 되지 않습니다.

"CLR 저장 프로시저" SQL Server 2005 온라인 설명서의 CLR에 대 한 자세한 내용은 저장 프로시저 및 예제를 참조 하세요.

생성자

SqlProcedureAttribute()

어셈블리에 있는 메서드 정의의 특성으로, SQL Server에서 지정된 메서드를 저장 프로시저로 등록해야 함을 나타내는 데 사용됩니다.

속성

Name

저장 프로시저의 이름입니다.

적용 대상