日期:2014-05-17 浏览次数:20843 次
create procedure [dbo].[getFriendList] @my INT OUTPUT, @friendid INT output, AS select @friendid=my from FriendInfo where MyID=@MyQQID
/* 准备演示过程 getFriendList, * CREATE PROCEDURE [dbo].[getFriendList] AS select 1 UNION ALL SELECT 2 UNION ALL SELECT 3 */ //.... public DataTable Execute() { DataTable dt = new DataTable(); SqlConnection conn=new SqlConnection(); SqlCommand cmd = new SqlCommand("getFriendList", conn); cmd.CommandType = CommandType.StoredProcedure; conn.Open(); dt.Load(cmd.ExecuteReader()); conn.Close(); return dt; }