Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss Content Posted by Andy Leonard
»
SSIS 101: Object Variables, ResultSets, and...
64 posts, Page 1 of 7
1
2
3
4
5
»
»»
SSIS 101: Object Variables, ResultSets, and Foreach Loop Containers
Rate Topic
Display Mode
Topic Options
Author
Message
Andy Leonard
Andy Leonard
Posted Wednesday, August 20, 2008 11:01 PM
Old Hand
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:53 PM
Points: 375,
Visits: 947
Comments posted to this topic are about the item
SSIS 101: Object Variables, ResultSets, and Foreach Loop Containers
Andy Leonard
CSO, Linchpin People
Follow me on Twitter:
@AndyLeonard
Post #556277
Jack Corbett
Jack Corbett
Posted Thursday, August 21, 2008 12:57 AM
SSChampion
Group: General Forum Members
Last Login: 2 days ago @ 12:22 PM
Points: 10,571,
Visits: 11,871
Good article Andy. Wish I'd had it a month ago when I was first trying to figure out how to use Execute SQL Task with a result set. Took me probably an hour of searching and experimenting. This article makes it clear. The biggest issue I had was that I had no clue that ResultName was supposed to be the ordinal position of the result set returned by the SQL Statement. I started out by entering and actual name in here, and why not? It does say ResultName. Why not call it what it is, Result Set Ordinal? After some searching and pulling out some hair, I finally found this out. Your article would have been a big help.
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #556308
Anipaul
Anipaul
Posted Thursday, August 21, 2008 4:13 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:50 AM
Points: 4,785,
Visits: 1,334
Nice Article...
Post #556385
SATISD9X
SATISD9X
Posted Thursday, August 21, 2008 4:28 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, April 16, 2013 6:35 AM
Points: 1,011,
Visits: 170
Very nice article.
Infact the one about ADO.Net ConnectionType is also great.
Will this still work throughout all other RDMBS. e.g. ORACLE, SYBASE etc?
-Satish
Post #556389
Don Staten
Don Staten
Posted Thursday, August 21, 2008 6:18 AM
Valued Member
Group: General Forum Members
Last Login: Monday, August 27, 2012 11:42 AM
Points: 65,
Visits: 50
Thanks, Andy, for taking the time to put this article together. Sure was great to get a hands-on demo from you yesterday... then seeing the article today. How timely ;)
This one is definitely getting bookmarked!
Post #556449
Thomas LeBlanc
Thomas LeBlanc
Posted Thursday, August 21, 2008 7:24 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, May 09, 2013 6:59 AM
Points: 2,700,
Visits: 716
Great article, thanks... you should do more on SSIS
Thomas
Thomas LeBlanc, MCITP DBA 2005, 2008 & MCDBA 2000
http://thesmilingdba.blogspot.com/
Post #556548
Russel Bell
Russel Bell
Posted Thursday, August 21, 2008 8:29 AM
Grasshopper
Group: General Forum Members
Last Login: Monday, January 21, 2013 8:42 AM
Points: 13,
Visits: 264
Thanks for the excellent treatment of a very common task that is not intuitive in SSIS. It seems relatively straightforward once you point out the ability to retrieve the resultset into an object variable, the kind of enumerator to use, and how to parse it out into variables. :P
Post #556621
todd_dawson
todd_dawson
Posted Friday, August 22, 2008 6:45 AM
Valued Member
Group: General Forum Members
Last Login: Thursday, November 06, 2008 6:21 PM
Points: 52,
Visits: 224
I keep getting a compile error on the VB.NET script saying that a declaration was expected on the 'PublicSub','sMsg','MsgBox' and 'Dts'.
The 'End Sub' is telling me it must be preceded by a matching 'Sub'.
I know nothing about the syntax from VB.NET but all I did was copy and paste your code over the code that was already there. Replacing the exsisting 'Main' function.
Holding my mouse over the SQL execute task in BIDS tells me that the task is configured to pre-compile the script, but no binary code is found. Please visit the IDE....
You need to correct your code and place a space in your 'Main' function to equal:
Public Sub Main()
This will help save some confusion for some of us non-code junkies. :)
Otherwise, very nice article.
Post #557298
Andy Leonard
Andy Leonard
Posted Saturday, August 23, 2008 7:01 AM
Old Hand
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:53 PM
Points: 375,
Visits: 947
Thanks for all the kind words! There will be more SSIS articles from me.
Todd, sorry you had trouble with the typo but I'm glad you found it and fixed it - and I really appreciate that you posted the fix!
:{> Andy
Andy Leonard
CSO, Linchpin People
Follow me on Twitter:
@AndyLeonard
Post #557754
Paul Williams
Paul Williams
Posted Friday, August 29, 2008 2:22 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Friday, April 05, 2013 5:08 AM
Points: 523,
Visits: 580
Hi Andy,
In the article it states "The Full result set option returns an ADO.Net dataset object.....".
According to BOL :
"If the task uses a native connection manager, including the ADO, OLE DB, Excel, and ODBC connection managers, the returned object is an ADO Recordset.
If the task uses a managed connection manager, such as the ADO.NET connection manager, then the returned object is a System.Data.DataSet."
Thus, as an OLE DB connection is being used in the SQL Task, is a ADO Recordset object being returned rather than an ADO.net dataset which you allude to later in the article ?
Paul R Williams.
Post #561041
« Prev Topic
|
Next Topic »
64 posts, Page 1 of 7
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.