Hi All, When I was trying to write some script in Script Task Editor it is showing "Dts is not declared" error. Can any one help me to sort out this problem.
Here I have provided my code for your reference.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
Public Sub Main()
Dim dayofweek As String = String.Format("[0]dddd", DateTime.Now)
Dts.Variables("User::DayOfWeek").Value = dayofweek
Dts.TaskResult = Dts.Results.Success
End Sub
End Class