关于ASP.NET2.0编写扩展存储过程的问题
2006-08-14 15:29
447 查看
SqlPipe 类
C# 复制代码
[Microsoft.SqlServer.Server.SqlProcedure()]
public static void StoredProcExecuteCommand(int rating)
{
// Connect through the context connection.
using (SqlConnection connection = new SqlConnection("context connection=true"))
{
connection.Open();
SqlCommand command = new SqlCommand(
"SELECT VendorID, AccountNumber, Name FROM Purchasing.Vendor " +
"WHERE CreditRating <= @rating", connection);
command.Parameters.AddWithValue("@rating", rating);
// Execute the command and send the results directly to the client.
SqlContext.Pipe.ExecuteAndSend(command);
}
以上存储过程的执行结果怎么样在ASP.NET2.0应用程序端来调用?
如果想把以上存储过程的返回结果体现在DataList控件中,应用程序端的调用代码是什么样的?
C# 复制代码
[Microsoft.SqlServer.Server.SqlProcedure()]
public static void StoredProcExecuteCommand(int rating)
{
// Connect through the context connection.
using (SqlConnection connection = new SqlConnection("context connection=true"))
{
connection.Open();
SqlCommand command = new SqlCommand(
"SELECT VendorID, AccountNumber, Name FROM Purchasing.Vendor " +
"WHERE CreditRating <= @rating", connection);
command.Parameters.AddWithValue("@rating", rating);
// Execute the command and send the results directly to the client.
SqlContext.Pipe.ExecuteAndSend(command);
}
以上存储过程的执行结果怎么样在ASP.NET2.0应用程序端来调用?
如果想把以上存储过程的返回结果体现在DataList控件中,应用程序端的调用代码是什么样的?
相关文章推荐
- 关于ASP.NET2.0编写扩展存储过程的问题
- 关于ASP.NET2.0编写扩展存储过程的问题
- c#关于数据库自定义类型在存储过程中返回服务器端的问题
- 用VS.Net编写扩展存储过程(前言)
- 关于mysql存储过程的definer的问题
- 关于存储过程的参数和ASP优化问题
- sql T_sql 关于CLR扩展存储过程的使用
- C 语言编译过程 C语言中各种数据存储的不同内存区域 关于sizeof 结构体比实际的大的问题
- 关于mysql存储过程的definer的问题
- 关于SQL Server 存储过程的一点问题
- 关于mysql存储过程的definer的问题1
- 关于hibernate 和 存储过程的优劣问题
- 用VS.Net编写扩展存储过程(一)
- 关于vs2008中,往dataset添加用了临时表的存储过程的问题。
- 关于mysql存储过程的definer的问题
- 关于JDBC使用命名参数(named parameters)进行存储过程调用的问题
- 关于MsSql2000中对于存储过程中的一个问题
- 关于mysql存储过程的definer的问题
- 关于PB和存储过程的问题
- 用VS.Net编写扩展存储过程(二)