John thanks.....for all the help. STill i am getting validation error on script component.
here are the steps and detail info.
1. Declare variable "Ident" of type int32, scoped to package.
2. inside dataflow, derived column and add as new column for the variable Ident.
3. Script component to use as transormation.
-on script page of transformation validate metadata set to true
- readwrite variables set to User::Ident.
On edit script page this is the code
Option Strict Off
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
MyBase.Input0_ProcessInputRow(Row)
Dim vars As IDTSVariables90
Dim Count As Integer
Me.VariableDispenser.LockOneForRead("PipelineRows", vars)
Count = vars(0).Value
vars.Unlock()
Me.VariableDispenser.LockOneForWrite("PipelineRows", vars)
vars(0).Value = Count + 1
Row.Indent = Count + 1
vars.Unlock()
End Sub
End Class
I get blue and green lines on this page, which i think is the prblm.
I am using VB as script langaugae.
4. in input columns of transformation i have ident column as input alias as ident and readwrtite type.
can u please check above code and make sure it is correct.
as i am very bad at VB and C#
thanks