SqlCommand cm = new SqlCommand("dbo.updateu",   cn);

解决方案 »

  1.   

    我都快疯了:这是调试的一些反馈String strConnection = ConfigurationSettings.AppSettings["ConnectionString"];
            SqlConnection cn = new SqlConnection(strConnection); //监控:cn = {System.Data.SqlClient.SqlConnection}        SqlCommand cm = new SqlCommand("dbo.updateu", cn); //监控:cm = System.Data.SqlClient.SqlCommand}
            cm.CommandType = CommandType.StoredProcedure;
            cm.Connection.Open();
            Guid userID;        //userID=00000000-0000-0000-0000-000000000000}        string userLogName,username, sex, phone, mobilephone;   //这些都是null
            userID = new Guid(GridView1.Rows[e.RowIndex].
            Cells[0].Controls[0].ToString());
            userLogName = ((TextBox)GridView1.Rows[e.RowIndex].
            Cells[1].Controls[0]).Text;
      

  2.   

    SqlConnection   conn   =   new   SqlConnection(ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString);   
                      SqlCommand   cmd   =   new   SqlCommand();   
                      cmd.CommandText   =   "northwind_OrdersPaged";   
                      cmd.Parameters.Add(new   SqlParameter("@PageIndex",SqlDbType.Int));   
                      cmd.Parameters["@PageIndex"].Value   =   1;   
        
                      cmd.Parameters.Add(new   SqlParameter("@PageSize",   SqlDbType.Int));   
                      cmd.Parameters["@PageSize"].Value   =   10;   
        
                      cmd.CommandType   =   CommandType.StoredProcedure;   
                      cmd.Connection   =   conn;   
                      cmd.Connection.Open();   
                      SqlDataReader   dr   =   cmd.ExecuteReader();  
      

  3.   

    你没运行阿
    cmd.excutenoquery '具体不记得了,但似乎你要执行一下