2 Replies Latest reply: May 7, 2013 8:40 AM by Felim Shanaghy RSS


    Felim Shanaghy

      Hi I am trying to create a script task to reload after the overnight reload but it doesnt appear to actually trigger, the script doesnt fail but doesnt invoke a reload?


      This is the script I am using, I have created a group on the server QlikView EDX and I am a member of it.


      Imports System

      Imports System.Data

      Imports System.Math

      Imports Microsoft.SqlServer.Dts.Runtime

      <System.AddIn.AddIn("ScriptMain", Version:="1.0", Publisher:="", Description:="")> _

      <System.CLSCompliantAttribute(False)> _

      Partial Public Class ScriptMain

          Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

          Enum ScriptResults

              Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success

              Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure

          End Enum

          Public Sub Main()

              Dim requestKey, xmlhttp

              xmlhttp = CreateObject("msxml2.xmlhttp.3.0")

              xmlhttp.open("post", "http://XXXXX:4720/qtxs.asmx", False)

              xmlhttp.send("<Global method=""GetTimeLimitedRequestKey"" />" & vbCrLf)

              requestKey = xmlhttp.responseXML.selectSingleNode("//GetTimeLimitedRequestKeyResult").text

              xmlhttp.open("post", "http://XXXXX:4720/qtxs.asmx", False)

              xmlhttp.send("<Global method=""RequestEDX"" key=""" & requestKey & """><i_TaskIDOrTaskName>Reload.qvw</i_TaskIDOrTaskName><i_Password /><i_VariableName /><i_VariableValueList /></Global>" & vbCrLf)

          End Sub

      End Class