标签:style blog http ar os 使用 sp 数据 on
1、创建自己的项目
2、右键“解决方案。。。”→添加→新建项目→C#→数据库→SQL Server项目,如下图所示:
3、选择操作数据库
4、创建存储过程
5、代码(详见:CLR存储过程)
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void StoredProcedure1()
    {
        // 在此处放置代码
    }
};
6、启用CLR集成
sp_configure 'clr enabled', 1 GO RECONFIGURE GO
右键数据库项目名称(SqlServerProject1)→部署。
标签:style blog http ar os 使用 sp 数据 on
原文地址:http://blog.csdn.net/lucky51222/article/details/40737569