Friday, June 10, 2005 - Posts

ForEach From Variable Enumerator... What's it good for?

Someone on an internal alias asked this and I though it might be generally intersting:

Can anyone give me a real world use for the Variable Enumerator? It seems like the Item enumerator is generally more useful. What can I do with a Variable enumerator that I can’t with an Item enumerator and vice-versa?

The FromVariable enumerator is useful in cases when you wish to build a collection at execution time. It's never used by itself as it is really just an indirect enumerator that points to another enumerator or collection to be used. It is an oddball ForEach Enumerator that does not implement a collection or ForEach semantics, rather it just holds a collection or another ForEach Enumerator.

So the real world use is to build a ForEachItem Enumerator or a collection with the script task or some other component and then store it in the FromVariable Enumerator to be used in the ForEach loop.

Thanks,

Universe.Earth.Software.Microsoft.SQLServer.IS.KirkHaselden

Where'd the Wizard go...

Weather'ed DTS users will know it as _The_ Wizard and wonder from where it can be launched. The Import/Export Wizard is no longer on the main start menu. I don't know why, but for some reason the powers that be decided that it would be better to not have the Import/Export Wizard on the start menu. 

If you're one of those folks that uses the Import/Export Wizard a lot and would like to have it available instantly, do what I did and put it on your start menu or in my case the Quick Launch bar.

  1. Open the folder where IS is installed (Unfortunately, still called DTS). On my machine it's at : C:\Program Files\Microsoft SQL Server\90\DTS\Binn
  2. Right click and drag/drop it to the task bar in the quick launch toobar.
  3. When the context menu pops up, select Create a shortcut here.
  4. Done

You can do the same with the start menu. Also, the other IS binaries are there as well. DTExecUI, DTExec, DTUtil, and the Migration Wizard.

Universe.Earth.Software.Microsoft.SQLServer.IS.KirkHaselden