Call .NET (2003) function from MS SQL 2000 User Defined Function (UDF)
Posted on 2006-05-09
It seems obvious that SQL-DMO comes into play. But before I bite off all that for the first time, is this a reasonable idea?
I have a VB.NET function that RC4-encrypts/decrypts values.
I want to call it from a SQL 2000 UDF as in:
Create Function dbo.udfDecodeSSN
DoRC4 ( dbo.Employee.SSN ) as SSN /* Note the function call here */
dbo.Employees.ID = @ID
/* Something like that */
DoRC4() is a VB.NET (2003) function. The password/encryption key is embedded in it and the .dll created from it is required to run the UDF.
So, is that going to work, and if so, could I get a clue as to calling my .NET function from the UDF?