Script output column not working

  • Hi,

    I have written a script to format the phone number (to exclude special charecters). It was working fine. But, in between testing it started not working. It i sgiving that the output variable is holding string as it is integer (earlier it used to hold string value). I have tried to change the data type of the output variable. Value box is completely black and whenever I click there the window is getting closed. I don't know if it is ssis issue. The code I am trying to pass value to output variable is

    Row.vchImportCustomerPhoneNumber = numbers.Replace(phone, String.Empty)

    Even I deleted the script completely and written agian, still the same issue.

    Please help me.

  • radb4u (8/3/2011)


    Hi,

    I have written a script to format the phone number (to exclude special charecters). It was working fine. But, in between testing it started not working. It i sgiving that the output variable is holding string as it is integer (earlier it used to hold string value). I have tried to change the data type of the output variable. Value box is completely black and whenever I click there the window is getting closed. I don't know if it is ssis issue. The code I am trying to pass value to output variable is

    Row.vchImportCustomerPhoneNumber = numbers.Replace(phone, String.Empty)

    Please help me.

    Things don't stop working for no reason: something has changed, in the procedure or in data the which is being supplied to the procedure.

    Please include the actual text of the error message, and some sample data.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Thank you for the reply. I have the following code:

    Row.vchImportCustomerPhoneNumber = nonumbers.Replace(phone, String.Empty)

    Error says 'disallow implicit conversion of string to integer'.

    So, I am trying to change the data type of 'vchImportCustomerPhoneNumber' (at common properties) at 'Data Type'. When I click there, its getting closed withought any message.

    Thanks

  • radb4u (8/3/2011)


    Thank you for the reply. I have the following code:

    Row.vchImportCustomerPhoneNumber = nonumbers.Replace(phone, String.Empty)

    Error says 'disallow implicit conversion of string to integer'.

    So, I am trying to change the data type of 'vchImportCustomerPhoneNumber' (at common properties) at 'Data Type'. When I click there, its getting closed withought any message.

    Thanks

    The datatype of vchImportCustomerPhoneNumber cannot be changed at this point because you are in the middle of a dataflow and it's already set.

    I suggest that you consider adding a derived column of type string before the script component and then use that in place of vchImportCustomerPhoneNumber.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I deleted script and recoded, still the error exists. I can follow your suggestion but it was working before. I have loaded data in to tables using this script. I was making changes to other data flows. Why it got disturbed I am unable to understand. But, thank you so much for your response.

  • Short of seeing any more info, all i can say is, look at your source data flow. Not the actual data flow task for the source, but the connection it is using. Then look at the data type of the column at the connection level. Maybe it is set to the wrong type.

    The data type of the column once you are looking at the data flow source, is not changeable, since it is obtained directly from the connection. if you want to change it, you'll need to use a derived column task or a data conversion task.

  • Great, it worked. Thank you.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply