董晓涛(David Dong)

博客园 首页 新随笔 联系 订阅 管理

the following is the SP demo:

using System;
using System.Data;
using System.Data.Sql;
using System.Data.SqlServer;
using System.Data.SqlTypes;


public partial class StoredProcedures
{

    [SqlProcedure]
    
public static void StoredProcedure1()
    
{
        
// Put your code here
        SqlConnection cn = SqlContext.GetConnection();
        SqlCommand cmd 
= cn.CreateCommand("select @@version");
        SqlContext.GetPipe().Execute(cmd);

        System.Threading.Thread.Sleep(
5000);

        SqlCommand cmd1 
= cn.CreateCommand("select * from HumanResources.Department");
        SqlContext.Pipe.Execute(cmd1);
         
    }

}
;


posted on 2005-04-16 18:54  董晓涛  阅读(299)  评论(0编辑  收藏  举报