LogProvider::GetExpression Method (String^)


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)

virtual String^ GetExpression(
	String^ propertyName
) sealed


Type: System::String^

The name of the property whose expression you want to see.

Return Value

Type: System::String^

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

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

Return to top