SQL-006: clsAppErrorCollection.RetrieveSQLCount
This query returns the total number of App_Error rows that match the same filter set used by SQL-005 . It allows callers to display total search counts even though the row query itself is limited to 300 results.
Classification
Field
Value
SQL ID
SQL-006
Operation type
Read
Execution method
Inline
Database
SQL Server
Schema
[unqualified]
Command type
Text
Business object
clsAppErrorCollection
Criteria property
RetrieveSQLCount
Lifecycle method
BeforeRetrieve (DataRequest2)
Parameters
Parameter
Direction
Type
Max length
Description
@ErrorDate
Input
DateTime
N/A
Exact-date filter when a single error 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_Error
SELECT (count)
Error_Date, Machine_Name, App_Name, User_Name, Error_Info, State_Info, Error_Source
Sample SQL
SELECT Count ( * )
FROM App_Error
WHERE cast ( cast ( App_Error . Error_Date as varchar ( 11 )) as datetime ) = @ ErrorDate
and App_Error . Machine_Name = @ MachineName
and App_Error . App_Name = @ AppName
and App_Error . User_Name like @ UserName
AND CONTAINS (( App_Error . Error_Info , App_Error . State_Info , App_Error . Error_Source ), @ SEARCHTEXT )
Operations and processes
Business rules
Sources
Application\SAIF.Application.LogView\clsAppErrorCollection.vb