开发者

CLR in SQL SERVER

I am a bit confused about SQL CLR. When i use the below query , then am i using CLR?

SqlCommand cmd = 
    new SqlCommand(
    "SELECT * from items where name like '" + textBox1.Tex开发者_开发问答t + "%'", conn);
SqlDataReader reader = cmd.ExecuteReader();

Please provide a simple explanation of SQL CLR with some real example


No, you are using ADO.NET from a .NET program (running on the CLR) to query a SQL database.
Except from the textBox1.Text part this could have been code running in SQL CLR.

SQL CLR is like stored procedures written in c# or VB.NET. The documentation provides a couple of examples.


The context of SQL CLR refers to using managed .NET code as the language for programmability inside your database. If you where to deploy that code to SQL server as a DLL then I believe you would be "using the CLR" in the context of your question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜