home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,095 of 19,505   
   Bob Barrows to tshad   
   Re: SSIS - Passing User Variables to scr   
   24 Jan 11 16:01:18   
   
   From: reb01501@NOyahooSPAM.com   
      
   tshad wrote:   
   > In 2008, I have a package that works fine where I am getting rows   
   > from my sql query and then I pass that to a Derived Column   
   > Transformation which goes to a Script Task that just write a piece of   
   > text and that goes to a Flat File Destination.   
   >   
   > In the Script task, I have the following:   
   >   
   >     public override void CreateNewOutputRows()   
   >     {   
   >         /*   
   >           Add rows by calling the AddRow method on the member   
   > variable named "Buffer".   
   >           For example, call MyOutputBuffer.AddRow() if your output   
   > was named "MyOutput".   
   >         */   
   >         Output0Buffer.AddRow();   
   >         Output0Buffer.Resultstext = "This is a test: ";   //   
   > +Convert.ToString(Variables.RowCnt);   
   >     }   
   >   
   > I also have a User Variable RowCnt that gives me the number of rows   
   > sent.   
   >   
   > This works fine.  I comment out the Convert statement because at this   
   > point you cannot see the variable since I don't have it set up as a   
   > ReadOnlyVariable.   
   >   
   > The file gets created with:   
   >   
   > Column 0   
   > This is a test:   
   >   
   > But I also want to pass RowCnt so I can display it so I select   
   > User::RowCnt from the list of ReadOnlyVariables.  Now in the Script I   
   > can see RowCnt in the Variables list.  But I don't change the code at   
   > all and I now get an error.   
      
   I'm not sure I'm following your description correctly. Perhaps this will   
   help ... ?   
   http://whiteknighttechnology.com/cs/blogs/brian_knight/archive/2   
   05/12/30/57.aspx   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca