标题:DataGridView问题
取消只看楼主
liuqiang_sy
Rank: 1
等 级:新手上路
帖 子:57
专家分:0
注 册:2007-3-13
 问题点数:0 回复次数:0 
DataGridView问题
private void button1_Click(object sender, EventArgs e)
        {
             string connectionstring = "Data Source=LQ;Initial Catalog=count;Integrated Security=True";
            SqlConnection con = new SqlConnection(connectionstring);
            SqlCommand sqlcom = new SqlCommand("sp_login", con); //sp_login存储过程
             = CommandType.StoredProcedure;
            sqlcom.Parameters.Add("@userId",SqlDbType.VarChar,8).Value=11;
            sqlcom.Parameters.Add("userPassWord",SqlDbType.VarChar,8).Value=11;
            con.Open();

            SqlDataAdapter custDA = new SqlDataAdapter(sqlcom);

            DataSet custDS = new DataSet();
            custDA.Fill(custDS, "login");
            datagridview1.DataSource = custDS;
            con.Close();
        }
为什么没有反映。这样不能在DataGridView1中显示我要查找的结果吗??//不可以应该怎么改。
搜索更多相关主题的帖子: DataGridView 
2007-12-10 21:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-191618-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.235552 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved