SQL Server CLR Help

Posted on 2012-08-29
Medium Priority
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
  • 2
  • 2
LVL 83

Expert Comment

ID: 38345865
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

ID: 38345885
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

CodeCruiser earned 2000 total points
ID: 38346075
You can then probably exchange a datatable.

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


Author Comment

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

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

850 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