朋友们问个问题啊关于dataset的
public DataSet proc_pageread(string tablelist,string tablename,string selectwhere,string selectorderid,string selectorder,int pageno,int pagesize)
{
SqlConnection conn = new SqlConnection(connection());
SqlCommand cmd = new SqlCommand( "aspnetproc ", conn);
conn.Close();
conn.Dispose();
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter para;
para = cmd.Parameters.Add( "@a_TableList ", SqlDbType.VarChar, 200); //搜索字段
cmd.Parameters[ "@a_TableList "].Value = tablelist;
para = cmd.Parameters.Add( "@a_TableName ", SqlDbType.VarChar, 30);//表
cmd.Parameters[ "@a_TableName "].Value = tablename;
para = cmd.Parameters.Add( "@a_SelectWhere ", SqlDbType.VarChar, 500);//搜索条件
cmd.Parameters[ "@a_SelectWhere "].Value = selectwhere;
para = cmd.Parameters.Add( "@a_SelectOrderId ", SqlDbType.VarChar, 50);//主键名
cmd.Parameters[ "@a_SelectOrderId "].Value = selectorderid;
para = cmd.Parameters.Add( "@a_SelectOrder ", SqlDbType.VarChar, 50);//排列
cmd.Parameters[ "@a_SelectOrder "].Value = selectorder;
para = cmd.Parameters.Add( "@a_intPageNo ", SqlDbType.Int);//页号
cmd.Parameters[ "@a_intPageNo "].Value = pageno;
para = cmd.Parameters.Add( "@a_intPageSize ", SqlDbType.Int);//页记录
cmd.Parameters[ "@a_intPageSize "].Value = pagesize;