Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: d32dbms.h
Link against: d32dbms.h

Class TDbQuery

TDbQuery

Support

Supported from 5.0

Description

A wrapper for an SQL string combined with a text comparison mode.

An instance of the class is used as a parameter to RDbView::Prepare(), RDbRowSet::FindL() and RDbRowConstraint::Open().

The evaluation of SQL queries or constraints depends on how Text columns are compared — so every SQL string is accompanied by a member of the TDbTextComparison enumeration to indicate how comparison is done.

Defined in TDbQuery:
Comparison(), Query(), TDbQuery()

See also:


Construction


TDbQuery()

TDbQuery(const TDesC& aQuery,TDbTextComparison aComparison=EDbCompareNormal);

Description

Constructs a query object from an SQL string and a text comparison mode.

Note that no copy is made of the descriptor passed; it is stored by reference in the query object.

Parameters

const TDesC& aQuery

The SQL string as a descriptor.

TDbTextComparison aComparison

The type of text comparison to use in evaluation of the SQL. If not supplied, normal comparison is used.

[Top]


Accessing the members


Comparison()

TDbTextComparison Comparison() const;

Description

Returns the text comparison mode for the query object.

Return value

TDbTextComparison

The text comparison mode.


Query()

const TDesC& Query() const;

Description

Returns the SQL string in the query object.

Return value

TDesC&

A descriptor containing the SQL string.