none
Expression > bug? RRS feed

  • Question

  • when I add an expression to my constraint like @[User::IsProcessed] == "N" where the variable IsProcessed is a char, I get the message that the data types "DT_UI2" and "DT_WSTR" are incompatible for binary operator "==". When I change my variable to string it works of course. I believe this is a bug in SSIS 2012? Where can we report such things?
    Friday, September 21, 2012 10:29 AM

All replies

  • What is the data type of the variable(IsProcessed). If Boolean. you can use expression such as

     bool bFlag = false;
    
    // TODO: Add your code here
                if((bool)Dts.Variables["User::bFlag"].Value == bFlag)
                {
                    MessageBox.Show("Hello");
                }
                else
    	        {
                     MessageBox.Show("Bye");
    	        }
    You can raise any issue at http://connect.microsoft.com/

    Please vote as helpful or mark as answer, if it helps
    Cheers, Raunak | t: @raunakjhawar | My Blog

    Friday, September 21, 2012 10:44 AM
  • Also, you need to specify values for boolean variables(either TRUE OR FALSE)

    @[User::bFlag] == FALSE
    OR
    @[User::bFlag] == TRUE


    Please vote as helpful or mark as answer, if it helps
    Cheers, Raunak | t: @raunakjhawar | My Blog

    Friday, September 21, 2012 10:48 AM
  • There are workarounds to support the comparison but you can always log a bug to get an explaination on the behaviour. If it's not a critical bug, report it at http://connect.microsoft.com. If it is critical, then use the link http://support.microsoft.com to open a support case and get it resolved.


    http://btsbee.wordpress.com/

    Friday, September 21, 2012 10:59 AM