Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execute Package Utility: Set boolean property value Expand / Collapse
Author
Message
Posted Thursday, December 19, 2013 1:31 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:55 AM
Points: 339, Visits: 747
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?
Post #1524781
Posted Thursday, December 19, 2013 1:53 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:55 AM
Points: 339, Visits: 747
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
Post #1524787
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse