Hi All
I want to search about max date from a table but my code don't work,
can any one help me please .
-------------------------------------------------------------------------------------
C#-code in class:
public DataSet ShowFees(int no_mum)
{
string sql = "select MAX(f_date) from fees where no_mum=" + no_mum;
return (Getdata(sql, "fees"));
}
-----------------------------------------------------------
C#-code in presintion:
private void button1_Click(object sender, EventArgs e)
{
DataSet ds2 = wor.ShowFees(Convert.ToInt32(textBox2.Text));
label5.Text = ds2.Tables["fees"].Rows[0]["f_date"].ToString();
}


Ranjit PowarRank #553 · 4.4K reputationPosted Nov 12, 2015, 5:41 AM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Nov 12, 2015, 4:27 AM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Nov 12, 2015, 4:27 AM EST
Hawi Aden19 reputationPosted Nov 12, 2015, 5:02 AM EST
code of Get Data From DtaBase
{
SqlDataAdapter da = new SqlDataAdapter(SQL, cn);
DataSet ds = new DataSet();
da.Fill(ds, TBL);
return ds;
}
-----------------------------------------------------------------------------------------------------------
Ravi PatelRank #439 · 5.7K reputationPosted Nov 12, 2015, 6:57 AM EST