Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <D32DBMS.H>
Link against: edbms.lib

Class RDbRowConstraint

class RDbRowConstraint;

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(const RDbRowConstraint &) function.

Members

Defined in RDbRowConstraint:

See also:


Member functions


Open(const RDbRowSet &,TDbQuery)

Capability: Security policy note: For a secure shared database, the caller must satisfy the read access policy for the table.

IMPORT_C TInt Open(const RDbRowSet &aView, TDbQuery aCriteria);

Description

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.

Parameters

const RDbRowSet &aView

The rowset to which the constraint will apply.

TDbQuery aCriteria

The SQL string and the text comparison mode for the constraint.

Return value

TInt

KErrNone, if successful, otherwise one of the system-wide error codes. Specifically:KErrNotFound if a column name in the SQL query does not KErrArgument if Invalid or unrecognised SQL syntax was KErrGeneral for a column type mismatch in a predicate in the SQL query or if a date-literal in the SQL query was 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.


Close()

IMPORT_C void Close();

Description

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