SQL Server CLR Help

Posted on 2012-08-29
Last Modified: 2012-08-31
I appreciate that once an assembly is registered that you can so something like

EXEC ClrSpEmployeeByShift @shiftID=1

Where shiftID is an expected parameter but what if I want to use a class as an object ie set numerous properties then call a function or sub
Question by:rocky050371
    LVL 83

    Expert Comment

    I think to be able to exchange objects as parameters, you need to declare that as a user defined data type in SQL Server and then you can use it.

    Author Comment

    Essentially it could be n number of name value pairs, then once they have all been passed I want to call a function based on the collection of values
    LVL 83

    Accepted Solution

    You can then probably exchange a datatable.

    Following example is from .NET to SQL but other way round should be similar

    Author Comment

    In OLE you can simply create an use an object, I wonder if a paramarray is possible?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Viewers will learn how the fundamental information of how to create a table.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now