database - TADOTable - how to count specific records at once? -
my db table (customer) has field "active" (yesno). i'm using tadotable work table , have statistic in status bar of app saying how many customers active , how many not active. can read if current customer active writing this:
bool isactive = customeradotable->fieldbyname("active")->asboolean;
but, how check records @ once? or need use tadoquery , sql statements because of this?
you're either going have run query, or loop through records in table , keep count of how many have active set true.
the query going faster, unless you've got few records. , query right way(tm) it. it'll scale better.
Comments
Post a Comment