Suposse I have an UDF in SQL Server 2008:
Create function dbo.ReadXml (@xmlMatrix xml) returns table
as
return
( select
--SOME C++ CODE
)
go
- Is it possible to add a c++ code or call a c++ function inside the UDF?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Onyl if this C++ function was compiled and installed as an extended stored procedure.
But extended stored procedures are deprecated and will be removed soon.
So your only reliable option is to write a CLR function. It can be a C# CLR function that calls an external C++ dll, or it might be a managed C++ CLR function that would contain your code directly.