How to I get a count of items in an entity?

Posts   
 
    
tetris
User
Posts: 3
Joined: 05-Feb-2008
# Posted on: 16-Apr-2008 15:33:15   

I have a table and I want to apply a filter to it and get a count of items. Well, actually I just want to check if a duplicate exists in the table already. This is not a primary key field and it cannot be, the check is done based on two parameters that I supply.

I was thinking of fetching the data and then counting my results, but that seems like such a waste of resrouces, is there a better way?

Thank you in advance. Tomasz

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 16-Apr-2008 16:03:53   

You should use the GetDBCount() method, and pass the required filter. Please look it up in the docs and in the reference manual.