I have a UDF in sql server. I want t开发者_如何学Co call this function at frontend (C# Code). Is it possible to do it.
Yeah, just grab a SqlConnection
object and:
var com = yourConnection.CreateCommand();
com.CommandText = "select dbo.MyUdf();";
com.ExecuteScalar();
If it's a table-valued UDF, use ExecuteReader()
or something similiar.
精彩评论