Sending Table to CLR stored procedure

  • Hi all,

    I use sql server 2008.

    I want to create a clr stored procedure and send a datatype type Table Valued Parameters to this clr.

    And this clr will do what have to do and returns this table changed ..

    Can i do this ?...

    $hell your Experience !!![/url]

  • I doubt you can do exactly that, but you can definitely send XML to one, shred it into a table (dataset), do stuff to it, and return the modified XML. Will that accomplish what you need?

    - 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

  • Yes..GSquared. Good idea...i think will be better work with XML..

    Thanks a lot

    $hell your Experience !!![/url]

  • Just curious... what will this CLR Stored Procedure do?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Laerte POltronieri Junior (4/29/2009)


    I use sql server 2008.

    I want to create a clr stored procedure and send a datatype type Table Valued Parameters to this clr.

    And this clr will do what have to do and returns this table changed ..

    Can i do this ?...

    No, Table-Valued Parameters cannot return modifications. So I would say go with Gus's XML idea.

    By the way, this is the SQL 2005 forum. There is a forum(s) specifically for SQL 2008.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I still want to know what the CLR procedure is going to do. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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