EXECUTE SQL Task error

  • Hi ,

    I am getting the following error while executing EXECUTE SQL Task

    [Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_Rowset".

    I have the following query to be executed :

    SELECT COL1 , COL2 FROM TAB1

    I have also mapped two varibles in the result set , to cature the result in objects.

    Can anyone tell me what am i doing wrong.:w00t: ???

  • Looks like you have the ResultSet configured to "Full result set"? If so, the Result Name has to be "0", it can't be set to column names.

    If you set the ResultSet to "Single row" then you can use column names or ordinal positions (0,1,2, etc) to map variables in the Result set.

    Reference:

    The ExecuteSQL Task

    BOL: Execute SQL Task

  • Todd , i am doing the same thing ... i retrieve two columns through the select query , the properties are as follows :

    ResultSet = Full result set

    SQLStatement= SELECT COL1,COL2 FROM source1

    In the Result set tab i have the following:

    Result Name Variable Name

    0 resultCol1

    1 resultCol2

    resultCol1 AND resultCol2 are variables with type Object.

    I dont understand whats wrong .... please help me ... :w00t:

  • In the Results tab remove Result Name "1".

    "If the result set type is Full result set or XML, you must use 0 as the result set name."

    - SQL Server 2005 Books Online (September 2007)

    To loop through the result set have a look at this article by Brian Knight: Looping through a ADO Resultset in SSIS

  • pritesh2205 - Wednesday, March 26, 2008 12:04 AM

    Todd , i am doing the same thing ... i retrieve two columns through the select query , the properties are as follows :ResultSet = Full result setSQLStatement= SELECT COL1,COL2 FROM source1In the Result set tab i have the following:Result Name Variable Name0 resultCol11 resultCol2resultCol1 AND resultCol2 are variables with type Object. I dont understand whats wrong .... please help me ... :w00t:

    Hi Pritesh,

    Did you resolve this issue? Since it is an old post i am guessing you must have. I am facing same issue as well. I would appreciate if you can post solution here.

Viewing 5 posts - 1 through 4 (of 4 total)

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