0 Replies Latest reply: May 15, 2014 10:15 AM by ZJSoule _ RSS

    Stored Procedure

    ZJSoule _

      Hi, I'm currently attempting to execute a stored procedure from a SQL Server DB in monarch's datapump, then export the results to monarch, but I'm not sure if the script should be put under the pre-export or post-export tab.


      We are using Datapump 10.5


      Here's the script:

      *On the References and Imports tab,


      Name: System.Data

      Assembly: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\System.Data.dll


      *Not sure if the following would go under the pre or post processing tab



      ' Set up Connection object and Connection String for a SQL Client

      Dim SQLCon As New SqlClient.SqlConnection


      SQLCon.ConnectionString = "Data Source=DSlifeproqa;Initial Catalog=LifePro;Integrated Security=sspi;"



      'Set up command object and properties

      Dim SQLCmd As New SqlClient.SqlCommand


      SQLCmd.CommandText = "dbo.usp_310REPORT" ' Stored Procedure to Call

      SQLCmd.CommandType = CommandType.StoredProcedure 'Setup Command Type

      SQLCmd.Connection = SQLCon 'Active Connection



      'Execute command



      Catch ex As Exception

      ' Do what you need to here or don't have it do anything


      End Try


      ' Dispose objects for garbage collection