title: How to pass values to a Web Service from SSIS Script task?
body: <p>I am following this <a href="http://sqlblog.com/blogs/andy_leonard/archive/2007/10/14/ssis-design-pattern-read-a-dataset-from-variable-in-a-script-task.aspx" rel="nofollow">blog</a> to write values to a web service. So far, I have been successful in reading my dataset and storing it within an object variable and then looping over them to display it one after the other.</p>
  
  <pre><code>    Imports System
      Imports System.Data
      Imports System.Math
      Imports Microsoft.SqlServer.Dts.Runtime
      Imports System.Xml
      Imports System.Data.OleDb
  
      Public Class ScriptMain
  
       Public Sub Main()
  
        Dim oleDA As New OleDbDataAdapter
        Dim dt As New DataTable
        Dim col As DataColumn
        Dim row As DataRow
        Dim sMsg As String
  
        oleDA.Fill(dt, Dts.Variables("dsVar").Value)
  
        For Each row In dt.Rows
         For Each col In dt.Columns
          sMsg = sMsg &amp; col.ColumnName &amp; ": " &amp; _
                 row(col.Ordinal).ToString &amp; vbCrLf
         Next
         MsgBox(sMsg)   //These 2 lines need to be changed
         sMsg = ""      //So that the Results can be sent to the web service.
        Next
  
        Dts.TaskResult = Dts.Results.Success
  
       End Sub
  
      End Class
  </code></pre>
  
  <p>This is all fine.</p>
  
  <p>Since I dont have any experience with .net programming, I was hoping to find some help in changing the code to write the same values to a web service call. I need to send a few rows and columns over to the web service which in turn would write the data to another database (Its DMZ and stuff and I dont know much about that). Can someone point me in the right direction. I dont intend on using the Web Service Task as my boss told me that he already had issues using the same. </p>
  
  <p>Any help in this regard is greatly appreciated.</p>