SQL-008: clsAppInfoCollection.RetrieveSQLCount
This query returns the total number of App_Info rows that match the same filter set used by SQL-007 . It preserves the library's standard exclusion of EPAY and DirectDeposit rows while supporting total-count reporting for paged result sets.
Classification
Field
Value
SQL ID
SQL-008
Operation type
Read
Execution method
Inline
Database
SQL Server
Schema
[unqualified]
Command type
Text
Business object
clsAppInfoCollection
Criteria property
RetrieveSQLCount
Lifecycle method
BeforeRetrieve (DataRequest2)
Parameters
Parameter
Direction
Type
Max length
Description
@CreateDate
Input
DateTime
N/A
Exact-date filter when a single create date is supplied instead of a range.
@MachineName
Input
String
50
Machine-name filter value.
@Username
Input
String
50
User-name filter value used for LIKE matching or paired with a generated IN (...) branch.
@AppName
Input
String
50
Application-name filter value.
@SEARCHTEXT
Input
String
100
Full-text predicate assembled by GetSearchValue().
Tables
Table
Access
Columns used
App_Info
SELECT (count)
Create_Date, Machine_Name, App_Name, User_Name, Message_Text, Data_Text
Sample SQL
SELECT count ( * )
FROM App_Info
WHERE cast ( cast ( App_Info . Create_Date as varchar ( 11 )) as datetime ) = @ CreateDate
and App_Info . Machine_Name = @ MachineName
and App_Info . App_Name = @ AppName
and App_Info . User_Name like @ UserName
AND CONTAINS (( App_Info . Message_Text , App_Info . Data_Text ), @ SEARCHTEXT )
and not ( App_Info . App_Name in ( 'EPAY' , 'DirectDeposit' ))
Operations and processes
Business rules
Sources
Application\SAIF.Application.LogView\clsAppInfoCollection.vb