gavriel ankri

gavriel ankri

  • NA
  • 39
  • 48.5k

Show count items from sql on a label

Feb 28 2012 1:27 AM
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)