Click or drag to resize

DatabaseDBCount Method (String, String, String)

Returns the number of items in the specified column and table using the SQL WHERE clause supplied. Note: For improved performance use DBExists(String, String) when possible.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public int DBCount(
	string column,
	string table,
	string where
)

Parameters

column
Type: SystemString
The name of the column from which to retrieve the value.
table
Type: SystemString
The name of the table from which to retrieve the value.
where
Type: SystemString
Filter criteria for which records to retrieve.

Return Value

Type: Int32
The number of matching records.

Implements

IDatabaseDBCount(String, String, String)
Examples
C#
// Lookup the first customer with a CompanyName that starts with Alfreds and print the value
object    val = db.DBLookup("CompanyName", "Customers", "CompanyName LIKE 'Alfreds%'");        
Console.WriteLine(val.ToString());

// Write the number of customers
Console.WriteLine(db.DBCount("*", "Customers", ""));
See Also