SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Execute Package Utility: Set boolean property value


Execute Package Utility: Set boolean property value

Author
Message
gbritton1
gbritton1
SSChasing Mays
SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)

Group: General Forum Members
Points: 641 Visits: 864
I have a boolean variable in my package called [User]::InitialLoad. The variable defaults to "False" but I want to be able to force it to "True" on the initial load, as the name suggests.

I believe that, in the GUI version of the utility, in the Set Values tab, I should enter the property path like this:

\Package.Variables[User::InitialLoad].Properties[Value]

is that correct?

Now, since InitialLoad is a Boolean variable, what should I put in the Value column to have the variable set to true or false, respectively:

1. The literal string "True" or "False"?
2. Numeric 1 or 0?
3. Numeric -1 or 0? (I've seen -1 used in some old vb code)
4. Something else?
gbritton1
gbritton1
SSChasing Mays
SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)SSChasing Mays (641 reputation)

Group: General Forum Members
Points: 641 Visits: 864
I think I figured it out:

for boolean variables, a numeric value of 0 is equivalent to False. Any other numeric value is equivalent to True. You can also pass in True or False, but any other text throws an error "could not set ... value to ..."

Also, if you pass in the string "true" or "false", the case is irrelevant. I think I'll stick with a leading cap, to be consistent with the BIDS IDE
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search