Execute SQL Returning Variable

  • I am using SSIS Execute SQL Task to do the below work

    I need to update variable with result from an query..

    Variable : ConnString -String

    Variable : ConnStringFull_DB -String

    Execute SQL Query : SELECT ConnFullString FROM Table WHERE ConnCode = ?

    I have to update the Variable ConnStringFull_DB with the result from above query.

    I have also set

    Parameter Mapping User::ConnString - Input - Varchar

    ResultSet 0 - User::ConnStringFull_DB

    I am getting errror as below . Kindly help me for the resultset

    [Execute SQL Task] Error: Executing the query "SELECT CD_DConnFullString FROM Table WHERE C..." failed with the following error: "The type of the value being assigned to variable "User::ConnStringFull_DB" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.

    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

  • Is the column returned by the query ASCII or UniCode (char or nchar)? I think I've seen that cause this error before.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

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