ipMonitor uses Microsoft's latest data access technology: ADO. ADO (ActiveX Data Object) is a successor to ODBC for the Windows platform. This tip illustrates the merits of the SQL verb: COUNT.
Often when first coding an SQL statement, the SQL query starts off with selecting all rows and all columns with:
SELECT * from TABLE
This results in a query that returns all columns and all rows. This SQL statement, along with specifying the maximum rows to retrieve, performs a full transaction, although it is bandwidth heavy.
A less intensive and more accurate integrity check occurs when you adjust the SQL statement to return a single row count, and analyze the content:
SELECT COUNT(*) from TABLE
This will return a single row with a single column. The column's value (column 1) will be equal to the number of rows in the database that match (the non-existent WHERE clause).
This method is less intensive on the SQL server, and it makes it trivial to analyze the row content to ensure your database meets its desired parameters.
For reference information on various SQL Database types, please refer to the following:
For information on other features and concepts related to those discussed in this article, refer to the following ipMonitor resources:
< Back
![]()
Last Updated: April 17, 2006 | What did you think of this topic?