I am trying to use the script component as a datatask source
The stored procedure takes a varchar(250) parameter
I have created the output columns and got so far in the script but am now stuck
can anyone guide me
Public Class ScriptMain Inherits UserComponent Dim connMgr As IDTSConnectionManager100 Dim sqlConn As SqlConnection Dim sqlCmd As SqlCommand Dim sqlParam As SqlParameter 'This method is called once, before rows begin to be processed in the data flow. ' 'You can remove this method if you don't need to do anything here. Public Overrides Sub AcquireConnections(ByVal Transaction As Object) connMgr = Me.Connections.MYConnection sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection) End Sub Public Overrides Sub PreExecute() MyBase.PreExecute() sqlCmd = New SqlCommand("EXECUTE sp_CRM_ImportARUDD", sqlConn) sqlCmd.CommandType = CommandType.StoredProcedure sqlParam = New SqlParameter("@FileName", SqlDbType.NVarChar, 250) sqlParam.Direction = ParameterDirection.Input sqlCmd.Parameters.Add(sqlParam) End Sub Public Overrides Sub PostExecute() MyBase.PostExecute() ' ' Add your code here ' End Sub Public Overrides Sub CreateNewOutputRows() ' ' Add rows by calling the AddRow method on the member variable named "<Output Name>Buffer". ' For example, call MyOutputBuffer.AddRow() if your output was named "MyOutput". ' End Sub End Class
Dont ask me .. i dont know