• sorry, pressend enter by mistake.

    1. Defined variable Name = LastInvoiceA

    Scope = package

    Type = string

    value = i left this blank, because i want to set it with script

    2. in a execute sql task on the genera tab i chose single row result set, OLEDB provider and my connection i've created. here is my query: select isnull(LastInvoice,0) as LastInvoiceA

    from admin_SalesFact

    where Co = 'A'. the result for this in SQL returns: 561196 which is correct.

    3. on the parameter tab my variable name is User::LastInvoiceA, direction = input, datatype = varchar, parameter name = 0(read that OLEDB connections expect either 0,1,etc) and size = 10, which is the size of my field in the table admin_SalesFact.

    4. on the result set tab, i mapped ResultSet Name = LastInvoiceA to variable name = User::LastInvoiceA.

    5. i rcreate a breakpoint on the sql task and run the package. Under locals , variable my variable User::LastInvoiceA = {}