RDbRowConstraint Class Reference

#include <d32dbms.h>

class RDbRowConstraint
Public Member Functions
IMPORT_C voidClose()
IMPORT_C TIntOpen(const RDbRowSet &, TDbQuery)

Detailed Description

Represents a pre-compiled SQL search-condition, which can be used to test against the current row in a rowset.

The constraint is compiled against a specific rowset, and can only be matched against the same rowset using the RDbRowSet::MatchL() function.

See also: RDbRowSet

Member Function Documentation

Close ( )

IMPORT_C voidClose()

Releases the resources used by the constraint before discarding the constraint object.

Open ( const RDbRowSet &, TDbQuery )

IMPORT_C TIntOpen(const RDbRowSet &aView,
TDbQueryaCriteria
)

Compiles the specified SQL search-condition for matching against rows in the specified rowset. The text comparison supplied in aCriteria is used for all text columns in the constraint.

capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
ParameterDescription
aViewThe rowset to which the constraint will apply.
aCriteriaThe SQL string and the text comparison mode for the constraint.

Returns: KErrNone, if successful, otherwise one of the system-wide error codes. Specifically:KErrNotFound if a column name in the SQL query does not exist.KErrArgument if Invalid or unrecognised SQL syntax was used.KErrGeneral for a column type mismatch in a predicate in the SQL query or if a date-literal in the SQL query was invalid.KErrOverflow if a number-literal in the SQL query for an integral column was too large (did not fit in a 32-bit integral representation). This can also be one of the DBMS database error codes.