IDatabaseDBLookup Method (String, String, String) |
You can use the DBLookup function to get the value of a particular column from a specified set of records
(a domain).
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax Object DBLookup(
string column,
string table,
string where
)
Function DBLookup (
column As String,
table As String,
where As String
) As Object
Parameters
- column
- Type: SystemString
An expression that identifies the field whose value you want to return.
It can be a string expression identifying a field in a table or query, or it can be an expression
that performs a calculation on data in that field.
- table
- Type: SystemString
A string expression identifying the set of records that constitutes the domain.
It can be a table name or a view name.
- where
- Type: SystemString
An optional string expression used to restrict the range of data on which the DLookup function is performed. For example, criteria is often equivalent to the WHERE clause in an SQL expression, without the word WHERE. If criteria is omitted, the DLookup function evaluates expr against the entire domain. Any field that is included in criteria must also be a field in domain.
Return Value
Type:
ObjectThe value in the column or null if no records are returned.
Remarks
Note that for performance reasons, this function does NOT check if multiple rows are returned from the query.
Examples
object val = db.DBLookup("CompanyName", "Customers", "CompanyName LIKE 'Alfreds%'");
Console.WriteLine(val.ToString());
Console.WriteLine(db.DBCount("*", "Customers", ""));
See Also