Showing posts with label figure. Show all posts
Showing posts with label figure. Show all posts

Monday, March 19, 2012

BUG REPORT: ReadWriteVariables different between Script Task and Script Component

I have just spent two hours banging my head off the wall to figure this one out... wondering if I had a problem with variable scope or something...

I had a Script Task which was taking a few package level variables to use in the script.

So I put the list of variables in the ReadWriteVariables property.

Specified them like this:

"User::FileBeingProcessed, User::FileSource"

And all was well....

Then later on decided to use the same set of variables in a Script Component contained in a Data Flow.

And kept kept getting a "..variable not found.." error dialog when I clicked on Design Script.

Finally the solution came to me: Spaces in the list of variables !

In a script task you can have a space after a comma in the list... but in a script component you CAN'T !!

So what works in a Script Task is :

Task : "User::FileBeingProcessed, User::FileSource"

But that will not work in a Script Component...

See the difference?:

Task :"User::FileBeingProcessed, User::FileSource"
Component:"User::FileBeingProcessed,User::FileSource"

I know the BOL says to use a comma separated list.. but.. some consistency would be nice...

PJ

I agree..that's a bit...err...cra@.p!

I always thought both used the syntax without a space in there and hence that what I always use - and hence I never have a problem with it.

Bug it! http://lab.msdn.microsoft.com/productfeedback/default.aspx

-Jamie

|||

Oh yeah, if you worked without the spaces you'd never see the problem... its just if you're an awkward fecker like me... heh heh...

Very misleading tho.. I was thrashing around for ages worried about scope (since the Script component is only down inside a data flow) and then applying service packs.. etc...

Still.. yer eventually glad just to find out yer not going crazy...

heh,

PJ

Sunday, February 12, 2012

BPA configuring 'Object Prefix'

I would like to configure the prefixes for several objects but I cannot figure out how to do so. From what I saw in the Properties section, it will only allow 1 property (I have already set up Stored Procedures) but I would like to do several (Stored Pro
cedure, Functions, Views, etc.) Can anyone point me in the right direction?
Thanks,
Jeff
Hi Jeff
Yes, you can only configure one rule per bet practice group. In order to
accommodate multiple checks, you'll have to create several separate Best
Practice Groups. We'll look into how to provide what you want in a single
best practice group in a future release.
- Christian
___________________________
Christian Kleinerman
Program Manager, SQL Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeff Kararo" <JeffKararo@.discussions.microsoft.com> wrote in message
news:9A3FBB14-CC30-4691-B4A3-5E3BD29633B3@.microsoft.com...
> I would like to configure the prefixes for several objects but I cannot
figure out how to do so. From what I saw in the Properties section, it will
only allow 1 property (I have already set up Stored Procedures) but I would
like to do several (Stored Procedure, Functions, Views, etc.) Can anyone
point me in the right direction?
> Thanks,
> Jeff
>