asp.net:应使用哪个数据集合返回表
我正在使用存储过程创建临时表,并希望在数据收集中返回它:asp.net:应使用哪个数据集合返回表,asp.net,stored-procedures,data-collection,Asp.net,Stored Procedures,Data Collection,我正在使用存储过程创建临时表,并希望在数据收集中返回它: public static >>data collection<< reportData(int intUserID) { SqlConnection con = Sql.getConnection(); try { SqlCommand cmd = new SqlCommand();
public static >>data collection<< reportData(int intUserID)
{
SqlConnection con = Sql.getConnection();
try
{
SqlCommand cmd = new SqlCommand();
cmd = new SqlCommand("usp_Get_Results", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@UserID", intUserID);
con.Open();
//put into data collection
//return data collection
}
catch (Exception ex)
{
//Log Error
con.Close();
}
finally
{
con.Close();
}
}
公共静态>>数据收集是一种常见的选择,适用于大多数情况
你可以把这家伙绑到一个机器上,马上就能得到很多功能
- 分类
- 自定义样式
- 寻呼
是一种常见的选择,适用于大多数情况
你可以把这家伙绑到一个机器上,马上就能得到很多功能
- 分类
- 自定义样式
- 寻呼