J Jesse Houwing Jun 16, 2006 #2 Lalit said: How can we call a sql server user defined function from C#? Click to expand... Create a SqlCommand and set the commandtext to @"select userDefinedFunction(@param, @param)" Now add these parameters to the SqlCommand aswell and you're all set. Alternatively you could wrap the UDP in a stored procedure and call that instead. Jesse Houwing
Lalit said: How can we call a sql server user defined function from C#? Click to expand... Create a SqlCommand and set the commandtext to @"select userDefinedFunction(@param, @param)" Now add these parameters to the SqlCommand aswell and you're all set. Alternatively you could wrap the UDP in a stored procedure and call that instead. Jesse Houwing
I Ignacio Machin \( .NET/ C# MVP \) Jun 16, 2006 #3 Hi, IIRC you need to include the owner of the function: @"select dbo.userDefinedFunction(@param, @param)"
Hi, IIRC you need to include the owner of the function: @"select dbo.userDefinedFunction(@param, @param)"