Testing package with invalid data in source xml

Unanswered Testing package with invalid data in source xml

  • Friday, April 06, 2012 7:52 PM
     
     
    I have a xml variable DeletePartsRec with datatype Boolean.  I've gotten my package to work using 0 or 1 for Ex.  <DeletePartsRec>1</DeletePartsRec>.  However, now I want to test invalid input to make sure my package doesn't fail when recieved.  So I tested a BLANK ok, but when testing 'A', I get a validation error: The string 'A' is not a valid Boolean value.  As you can see when XML Source fails I try to redirect those errors on the error path to a XML Destination.  What do I need to do to prevent my package from failing on A-Z input?? Thanks.

    Evan Johnson

All Replies

  • Friday, April 06, 2012 7:54 PM
     
     


    Evan Johnson


    • Edited by encryptoras Friday, April 06, 2012 7:55 PM
    •  
  • Thursday, April 19, 2012 7:05 AM
    Moderator
     
     

    Hi encryptoras encryptoras

    What error message appear when redirecting error failed? I suggest you can redirect error to another destination and then check if the error redirect still failed.

    Errors frequently occur because of unexpected data values. For example, a data conversion fails because a column contains a string instead of a number, an insertion into a database column fails because the data is a date and the column has a numeric data type, or an expression fails to evaluate because a column value is zero, resulting in a mathematical operation that is not valid. For more information about how to handle errors in data, please refer to the following link: http://msdn.microsoft.com/en-us/library/ms141679 

    Thanks,
    Eileen

  • Thursday, April 19, 2012 7:34 AM
     
     

    What error message appear when redirecting error failed? I suggest you can redirect error to another destination and then check if the error redirect still failed.

    The OP clearly demonstrated that the package still fails, even when errors are redirected.

    @Encryptoras: is it possible to change the datatype to string instead of boolean and check the values in the dataflow?

    ps: which tool did you use to visualize the XML like that? It looks pretty nice.


    MCTS, MCITP - Please mark posts as answered where appropriate.