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,094 of 19,505   
   tshad to All   
   SSIS - Passing User Variables to script    
   24 Jan 11 12:50:54   
   
   From: tfs@dslextreme.com   
      
   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.   
      
   The Console shows up on my screen (but I can't stop it).   
   My file is created with nothing in it.   
   And another file is created - SQLDUMPER_ERRORLOG.log - with the following in   
   it:   
      
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input   
   parameters: 4 supplied   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,  Parameter   
   1: 2808   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,  Parameter   
   2: 0   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,  Parameter   
   3: 0:0   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,  Parameter   
   4: 0100D608   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Parsed   
   parameters:   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ProcessID = 2808   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ThreadId = 0   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,     Flags =   
   0x0   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   MiniDumpFlags = 0x0   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   SqlInfoPtr = 0x0100D608   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,     DumpDir   
   =    
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ExceptionRecordPtr = 0x00000000   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ContextPtr = 0x00000000   
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ExtraFile =    
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   InstanceName =    
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE,   
   ServiceName =    
   (650:16F4) 01/24/11 12:39:47, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, Create dump   
   file C:\Program Files\Microsoft SQL   
   Server\100\Shared\ErrorDumps\SQLDmpr0001.mdmp failed  0x3 - The system   
   cannot find the path specified.   
      
   (650:16F4) 01/24/11 12:39:47, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Watson   
   Invoke: No   
      
   This apparently was caused by there being no "ErrorDumps" folder in it. It   
   shows up in the folder I had defined for my file.   
      
   When I add the ErrorDumps folder, it creates an SQLDmpr0001.mdmp and a   
   ISD7DE.tmp in it.   
      
   Why does passing this variable cause a problem????  I am not accessing it.   
   I originally thought my accessing it with my convert statement caused the   
   problem.   
      
   Thanks,   
      
   Tom   
      
   --- 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