Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
<?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 xml:lang="en" id="GUID-05DA872F-F70E-5085-8AA9-12B6A0B71917"><title>Using TDbQuery class</title><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>