Export (0) Print
Expand All

LogProvider.GetExpression Method

Returns a String that contains the expression for the specified property. Null means no expression is assigned.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

abstract GetExpression : 
        propertyName:string -> string  
override GetExpression : 
        propertyName:string -> string

Parameters

propertyName
Type: String
The name of the property whose expression you want to see.

Return Value

Type: String
A String that contains the expression used to evaluate the property.

Implements

IDTSPropertiesProvider.GetExpression(String)

The propertyName will be ConfigString, Description, or Name. For the log provider, those are currently the only three properties that can use an expression.

The following example sets the Description property of the log provider to be the text, "This is the log for…" with the current month and day appended to the end of the string. It then validates the package, which resolves the expression and saves the value to the property specified in propertyName. The expression will also be set on the expressions on the property when the package is saved.

No code example is currently available or this language may not be supported.

Sample output:

Current description: Writes log entries for events to a CSV file

Validation passed: Success

The expression for Description is "This is the log for January 06"

The description is now: This is the log for January 06

Community Additions

ADD
Show:
© 2014 Microsoft