CLR存储过程取回表内容
来源:互联网 发布:linux 命令行 复制内容 编辑:程序博客网 时间:2024/06/05 07:13
CLR存储过程
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void StoredProcedure1()
{
// 在此处放置代码
SqlConnection sqlConnection = new SqlConnection("context connection=true");
sqlConnection.Open();
SqlCommand sqlCommand = new SqlCommand("select * from ttt", sqlConnection);
SqlDataReader dr=sqlCommand.ExecuteReader();
SqlContext.Pipe.Send(dr);
dr.Close();
sqlConnection.Close();
}
};
调用存储过程
SqlConnection Conn = new SqlConnection("Data Source=xxx.xxx.xxx.xxx;Initial Catalog=testDB;User ID=xxx;Password=xxx");
Conn.Open();
SqlCommand sqlcmd = new SqlCommand("StoredProcedure1", Conn);
sqlcmd.CommandType = CommandType.StoredProcedure;
SqlDataReader dr=sqlcmd.ExecuteReader();
while (dr.Read())
{
Response.Write(dr[1].ToString());
}
- CLR存储过程取回表内容
- 部署clr存储过程
- CLR 存储过程 优势
- CLR存储过程
- CLR存储过程的优势!
- SQL Server CLR全功略之二---CLR存储过程
- SQL Server CLR全功略之二---CLR存储过程
- SQL Server CLR全功略之二---CLR存储过程
- CLR存储过程(Stored Procedure)
- SQL Sever 2005创建 CLR 存储过程
- SqlServer CLR存储过程使用一例
- 在MSSQL中使用CLR存储过程
- SQL SERVER 的 CLR 存储过程
- SQL SERVER CLR存储过程实现
- SQL SERVER 的 CLR 存储过程
- SQL SERVER 的 CLR 存储过程
- 简单创建与布署CLR存储过程
- 带参数的CLR存储过程
- 一些原则
- js代码总结
- 11个领悟人生的笑话
- 常见iPhone错误代码提示及解决方法
- url中的jsessionid
- CLR存储过程取回表内容
- win2003服务器允许下载.exe文件的方法
- Tomcat中增加对rar下载的支持
- WAP与PHP - 基础篇
- GridView支持分页的自动编号
- OSI 网络结构的七层模型
- Schema for Web Services
- 给位前辈,帮帮我吧,小女子感激不尽!
- 一位教授对我细细的职业劝导(受用一生)