Symbian3/SDK/Source/GUID-05DA872F-F70E-5085-8AA9-12B6A0B71917.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 15:24:34 +0100
changeset 9 59758314f811
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-05DA872F-F70E-5085-8AA9-12B6A0B71917" xml:lang="en"><title>Using
TDbQuery class</title><shortdesc>Explains how to use the <codeph>TDbQuery</codeph> class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The design of this class is chosen so that the descriptor containing the
SQL can be passed in the place of the <codeph>TDbQuery</codeph> object, which
will be implicitly constructed with normal text comparison. So given</p>
<codeblock id="GUID-5CE628CD-6B02-570B-8C08-858455D2E694" xml:space="preserve">TPtrC sql=_L("select * from Personnel where Name like 'A*'");
RDbView view;</codeblock>
<p>Then</p>
<codeblock id="GUID-152661DA-ACC2-57E5-AA4E-252A8FF42E89" xml:space="preserve">view.Prepare(database,sql);</codeblock>
<p>is equivalent to</p>
<codeblock id="GUID-F0E34B77-A117-58E9-9CDE-3AB22289DE31" xml:space="preserve">view.Prepare(database,TDbQuery(sql,EDbCompareNormal));</codeblock>
<p>To specify any other comparison type, the query object must be explicitly
constructed:</p>
<codeblock id="GUID-7386D1EC-7611-5C1F-BC11-F826396D6D12" xml:space="preserve">view.Prepare(database,TDbQuery(sql,EDbCompareFolded));</codeblock>
</conbody></concept>