hi friends,
i want to check from label1(last_datetime),only view, after the records(last_datetime) in gridview.
>(greater than) is not displayed the records)
string CommandText = "select * from data where cdate > '" + Convert.ToDateTime(last_datetime) + "' Order By cdate desc limit 20";
---------------------------------------------------------------------------
public void filldate()
{
cmd.CommandText = "select top 1 cdate from data";
Label1.Text = Convert.ToString(cmd.ExecuteScalar());
}
}
---------------------------------------------------------------------------
public void fillgrid()
{
string last_datetime = Label1.Text;
string ConnectionString = @" ";
string CommandText = "select * from data where cdate > '" + Convert.ToDateTime(last_datetime) + "' Order By cdate desc limit 20";
}
---------------------------------------------------------------------------
and
how to if label1.text display no records if not in database.
please give the correct solution,
thanks in advance.