Compartir a través de


Subscription.GetFieldValue Method

Returns the value of a field in the subscription record.

Espacio de nombres: Microsoft.SqlServer.NotificationServices
Ensamblado: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

Sintaxis

'Declaración
Public Function GetFieldValue ( _
    fieldName As String _
) As Object
public Object GetFieldValue (
    string fieldName
)
public:
virtual Object^ GetFieldValue (
    String^ fieldName
) sealed
public final Object GetFieldValue (
    String fieldName
)
public final function GetFieldValue (
    fieldName : String
) : Object

Parámetros

  • fieldName
    The name of the subscription field for which you want the value returned.

Valor devuelto

An Object that represents the value of the field.

Notas

This method is provided for COM interoperability, to allow callers from unmanaged code to get field values from a subscription record. Managed callers do not use this method.

Ejemplo

The following example shows how to use the GetFieldValue method in unmanaged Microsoft Visual Basic Scripting Edition (VBScript) code to get the value of a subscription field:

Dim myInstance, myApplication, mySubscription, fieldValue

const instanceName = "MyInstanceName"
const applicationName = "MyApplicationName"
const subscriptionClassName = "MySubscriptionClassName"
const fieldName = "MySubscriptionFieldName"

'Create & initialize an NSInstance object.
set myInstance = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.NSInstance")
myInstance.Initialize instanceName

'Create & initialize an NSApplication object.
set myApplication = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.NSApplication")
myApplication.Initialize (myInstance), applicationName

'Create & initialize a Subscription object.
set mySubscription= WScript.CreateObject("Microsoft.SqlServer.NotificationServices.Subscription")
mySubscription.Initialize (myApplication), subscriptionClassName

mySubscription.SubscriptionId = "1"

fieldValue = mySubscription.GetFieldValue(fieldName)

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

Subscription Class
Subscription Members
Microsoft.SqlServer.NotificationServices Namespace