tag:blogger.com,1999:blog-2303058199815958946.post694130070764730220..comments2024-03-28T10:36:35.016+01:00Comments on Microsoft SQL Server Integration Services: How to use variables in a Script ComponentJoost van Rossumhttp://www.blogger.com/profile/01125981589974671317noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-2303058199815958946.post-36717372155591129262013-05-21T19:17:54.794+02:002013-05-21T19:17:54.794+02:00It's best to ask this question in the MSDN for...It's best to ask this question in the MSDN forum...<br /><br />How are you counting the records? RowCount transformation? Easiest is to use a <a href="http://microsoft-ssis.blogspot.com/2010/12/how-to-use-variables-in-script-task.html" rel="nofollow">Script Task</a> after the Data Flow Task and add the number of your variable to an other variable.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-18322640341452462372013-05-21T16:15:46.385+02:002013-05-21T16:15:46.385+02:00Hi Joost
Thanks for the tutorial, my package is re...Hi Joost<br />Thanks for the tutorial, my package is reading records from multible files that are located in one folder. Therefore, my package has a foreach loop that access multible files. I can count all records from the first file, when the new file starts, the counter goes back to zero(which is a problem because my database table require a unique id). I am trying to keep the count when my package proceeds to a new file. <br /><br />also, in the tutorial, we set the input, but how about the output. <br /><br /><br />best regards. Mubarakhttps://www.blogger.com/profile/15340641884643792572noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-41240674721528740532013-05-07T08:38:50.171+02:002013-05-07T08:38:50.171+02:00This is terrific. Thank you very much.
NedThis is terrific. Thank you very much.<br /><br />NedNednoreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-44836567150223730362013-04-22T13:49:03.380+02:002013-04-22T13:49:03.380+02:00ok i managed to do it by replacing the variables a...ok i managed to do it by replacing the variables as readandwrite to writeonly.<br />thanks ;)Joao Azevedohttps://www.blogger.com/profile/07678144917595146759noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-24652315168683724412013-04-22T13:45:50.745+02:002013-04-22T13:45:50.745+02:00Hi Josh, i find your tutorials very helpful, so do...Hi Josh, i find your tutorials very helpful, so don't stop making them cause of tards :)<br /><br />in this one i have one question.<br />i want to use the variables during execute fase. But in this tutorial the variables are used post execution. i just want to read this variables so that i can get some values:)<br /> Joao Azevedohttps://www.blogger.com/profile/07678144917595146759noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-38936146164989792472013-01-23T07:27:50.552+01:002013-01-23T07:27:50.552+01:00Hi mister Anonymous,
Thank you for your construct...Hi mister Anonymous,<br /><br />Thank you for your constructive feedback. There is a great website called http://msdn.microsoft.com and you will find all your answers over there. And there is also a great book about scripting in SSIS that you could buy/read: http://www.amazon.com/Rational-Guide-Extending-Script-Guides/dp/1932577254<br /><br />Regards,<br /><br />JoostJoost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-63687365699577256452013-01-22T23:29:14.112+01:002013-01-22T23:29:14.112+01:00This is worthless. What kind of Script Transformat...This is worthless. What kind of Script Transformation? Source? Destination? So many other details LACKING.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-27762748217139455612013-01-22T21:14:14.281+01:002013-01-22T21:14:14.281+01:00Hi Matthias,
It's not possible to loop throug...Hi Matthias,<br /><br />It's not possible to loop through all variables in a package, but it is probably possible to loop through all variables that are selected. Haven't done it will try it and let you know if I have some time left in the comming days. If it is more urgent post a question in the SSIS MSDN forum.<br /><br />Regards,<br /><br />JoostJoost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-69065710717938060982013-01-22T20:59:46.641+01:002013-01-22T20:59:46.641+01:00Hi Joost,
thanks for the tutorial! Do you know ho...Hi Joost,<br /><br />thanks for the tutorial! Do you know how (1) to get a list of all variables or (2) to get a list of all readable or writeable variables within a script component to use it by a foreach command?<br /><br />Regards,<br /><br />MatthiasAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-34187975367263813112013-01-22T15:28:22.766+01:002013-01-22T15:28:22.766+01:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-65845757918743654382013-01-04T17:44:25.491+01:002013-01-04T17:44:25.491+01:00Mail me (via Contect Me in menu) your code and the...Mail me (via <strong>Contect Me</strong> in menu) your code and the purpose of your script.<br /><br />Regards,<br /><br />JoostJoost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-43653717242446807682013-01-04T17:07:55.352+01:002013-01-04T17:07:55.352+01:00Hi,
I followed your tutorial but when I run my pac...Hi,<br />I followed your tutorial but when I run my package, the Input0_ProcessInputRow method did not process. Thank youAnonymoushttps://www.blogger.com/profile/16248699825063320944noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-10944392424766216902012-10-22T15:07:39.764+02:002012-10-22T15:07:39.764+02:00I think you are a bit confused... A Script Task is...I think you are a bit confused... A Script <a href="http://msdn.microsoft.com/en-us/library/ms141752.aspx" rel="nofollow"><strong>Task</strong></a> is part of the Control Flow and a Script <a href="http://msdn.microsoft.com/en-us/library/ms137640.aspx" rel="nofollow"><strong>Component</strong></a> is part of the Data Flow. This post is about the Script <strong>Component</strong>. Go to this page for the Script Task: <a href="http://microsoft-ssis.blogspot.com/2010/12/how-to-use-variables-in-script-task.html" rel="nofollow">http://microsoft-ssis.blogspot.com/2010/12/how-to-use-variables-in-script-task.html</a>Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-92071327473460462082012-10-22T14:54:18.465+02:002012-10-22T14:54:18.465+02:00Hi,
This post relates to working with variables i...Hi,<br /><br />This post relates to working with variables inside of a Script Task TRANSFORMATION (Data Flow), and not a Script Task COMPONENT (Control Flow).<br /><br />The difference is that the UserComponent base class isn't visible inside of a Script Component, and so, all of your VBscript methods fail.Chitharanjan Dashttps://www.blogger.com/profile/00740493186531856641noreply@blogger.com