惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
Y
Y Combinator Blog
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
V
V2EX
腾讯CDC
F
Fortinet All Blogs
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss

博客园 - 董晓涛

如何将存储过程执行后的结果集放入临时表 Detect SQL timeout from ASP & Issue RollbackTrans SQL Server 2005 symmetric encrytion sample 如何解决:Error 14274: 无法添加、更新或删除从MSX服务器上发起的作业. Useful Links(to Learn SQL Server) Encrypting Data With the SQL Server Encrypt Function Convert IP To Numberic Generate table structure Generate Time Dim Generate Insert data script on a table. - 董晓涛 Execute T-SQL asynchronously Don't Use Select * Sql Server数据库被置疑后解决方法 SQL Server 2005中对BLOB的支持(ntext,text and image) SQL Server 2000 Service Pack 4 is released 数据规范化 Microsoft SQL Server 2005 and Vs.net 2005 April 2005 Version XML IN 20 MINUTES! XQuery in SQL Server 2005
CLR Integrated in SQL Server 2005
董晓涛 · 2005-04-16 · via 博客园 - 董晓涛

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  董晓涛  阅读(305)  评论(0)    收藏  举报