CLR Table-Valued Function Example with Full Streaming (STVF)

  • May be late to the game, but MSSQL 2008 R2 SP2 fix that.

    the other option /works for me/:

    My main function indeed had some arguments as SqlBytes XX1, XX2 ....

    and by the end

    foreach( var row in rows)

    yield return row;

    I was getting error, shown in the article, while

    return rows was OK.

    Simple move of yield statement in separate function fixed it.

    ....

    return InfoOut( row);

    private static IEnumerable InfoOut( List<Row> rows)

    {

    foreach( var row in rows)

    yield return row;

    }

Viewing post 61 (of 60 total)

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