开发者

Can I call a UDF at Frontend

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜