4
Reply

Show count items from sql on a label

gavriel ankri

gavriel ankri

Feb 28 2012 1:27 AM
6.9k
Hello
I tried to show on a label how many items I have on SQL table

I did this code

 public DataTable CountItemsonGrid()
  {

  return dal.GetTable(string.Format("SELECT  COUNT(Finish) AS Expr1 FROM Problems WHERE  (Finish = 'false')"));
 

  }



and then 

lbcount.Text = pplLogic.CountItemsonGrid().ToString();


whats wrong ?

Answers (4)