how to store sql select to gridview ASP.net C# -


  SQL Commands CMD = new SQL Commands ("Select * from [order] where date and gt; = @ Start and date & lt; = @ and ", conn); Cmd.Parameters.AddWithValue ("Start", DT1); Cmd.Parameters.AddWithValue ("@ end", dt2);   

This is my selection statement, I want to keep this data on Gridview, how to use Datasets to store in ASPN C # support ASAP in Gridview. Use

.

  SqlCommand CMD = New SQL Command (select [from [order] where date is> = start and date & lt; = @ end ", cone); Cmd.Parameters.AddWithValue ("Start", DT1); Cmd.Parameters.AddWithValue ("@ end", dt2); SqlDataAdapter sda = New SqlDataAdapater (cmd); Datatable dt = new datatable (); Sda.fill (dt); YourGridView.DataSource = DT; YourGridView.DataBind ();    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -