SqlConnection conn = new SqlConnection("Server= localhost; database=tailoringmng; integrated Security=true"); SqlCommand cmd = new SqlCommand("undonetask",conn); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(cmd); if (conn == null && conn.State == ConnectionState.Closed) { conn.Open(); } DataTable dt = new DataTable("myTable"); da.Fill(dt); dgridstatus.DataSource = dt.DefaultView; conn.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)