当前位置:编程学习 > C#/ASP.NET >>

asp.net怎么通过储存过程查询一条记录返回所这行记录所有字段的值

asp.net怎么通过储存过程查询一条记录返回所这行记录所有字段的值 --------------------编程问答-------------------- select * from table 不就是了? --------------------编程问答-------------------- hashtable

select * from tablename where condition; --------------------编程问答-------------------- 不要直接的,我要学习asp.net调用存储过程哇! --------------------编程问答--------------------   public static DataSet GetDataset(string storedProcName, SqlParameter[] p)
        {
            DataSet ds = new DataSet();
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
               
                connection.Open();
                SqlCommand command = new SqlCommand(connection, storedProcName, p);
                command.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter ap = new SqlDataAdapter(command);
                ap.Fill(ds);
                return ds;
            }
        }
--------------------编程问答-------------------- 等待答案中··
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,