can we pass objects to Sql stored procedures??

  • friends is it possible to pass a object to sql CLR stored procedures

  • The answer is yes there are ways, the follow on question is why would you want to?

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

  • it will be easy for me to retrieve data from object which is passed into the CLR SQL.

    if u know the method please help me 🙂

  • You can do it with XML Serialization, but this is likely not the correct implementation following best practices or performance. If you can describe your problem better, we can likely offer you the best implementation to solve it, generally not using CLR. Serialization carries its own issues in SQL CLR, and should not be implemented without careful consideration of other alternatives. What are you trying to do specifically, and why aren't you using normal constructs in your application like SqlDataAdapters or Insert procedures to store your data to the database?

    Easy rarely = good performance or best practice implementation. One of the biggest problems Sr people in the SQL community have with CLR is that is easily misused to create incorrect solutions to problems. CLR won't replace proper coding in TSQL for performance or scalability.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

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

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