CodePudding user response:
You can put the want to display in SQL found out or to assign a value to a new datatable, this method should return a datarowif (dt. Rows. Count & gt; 0)
{
The DataTable new_dt=dt. Clone ();
int i=0;
Foreach (DataRow Dr In dt. Rows)
{
If (I & lt; 30)
{
New_dt. ImportRow (Dr);
}
The else break;
i++;
}
}
CodePudding user response:
Just want to display a line, if the line 1, change to the select statement: select top 1 * from the OrdersIf there is a specific line, just add a where clause condition specified ID number,