CodeBase Database Tools For Programmers
Search   
Advanced Search
products   order   reviews   downloads   links   support   contact   about us    home  
CodeBase Knowledge Base
Knowledge Base Home
Walkthroughs
Development Environment Specific
Queries and Relations
Client/Server
Expressions
Indexing and Seeking
Performance & Memory Management
CodeBase Administrator
OLE DB
ODBC
JDBC
CodeControls
Errors and Error Handling
Miscellaneous

Counting Records in a Relation

Article ID: C01003
Last updated: 2004/07/09

The only way to calculate the number of records that match a query is to skip through your relation, counting as you go. Once your relation is set up and a query is set, call relate4top and then relate4skip. For example:

for (count = 0, int rc = relate4top(rel); rc == r4success; rc = relate4skip())
{
   count++;
}

This method of counting records in a relation can be time-consuming if there are many records in your results. We have recently added a function that quickly counts these records internally. This feature will appear in a future release of CodeBase. As a consulting service, we can give you the required support before the next release. If you are interested, please contact our consulting department.

Sequiter Inc.