Symbian3/PDK/Source/GUID-580471E3-7DFD-5325-A8B9-B3E7FABF872D.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-580471E3-7DFD-5325-A8B9-B3E7FABF872D"><title>Using TDbColSetIter</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Using the iterator</title> <p><codeph>TDbColSetIter</codeph> provides a useful way to iterate over the contents of a column set. Given a <codeph>CDbColSet* set</codeph>, we can count the number of nullable columns like this:</p> <codeblock id="GUID-14CED4FF-C2A4-54E4-B089-A97EA9503AE6" xml:space="preserve">TInt nullable=0;
    12 <concept id="GUID-580471E3-7DFD-5325-A8B9-B3E7FABF872D" xml:lang="en"><title>Using
       
    13 TDbColSetIter</title><shortdesc>Provides a code snippet to show you how to use the <codeph>TDbColSetIter</codeph> iterator.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-3A50A4D7-B6BD-40AB-B413-167BE7DE6DE9"><title>Using the iterator</title> <p><codeph>TDbColSetIter</codeph> provides
       
    15 a useful way to iterate over the contents of a column set. Given a <codeph>CDbColSet*
       
    16 set</codeph>, we can count the number of nullable columns like this:</p> <codeblock id="GUID-14CED4FF-C2A4-54E4-B089-A97EA9503AE6" xml:space="preserve">TInt nullable=0;
    13 for (TDbColSetIter iter(*set);iter;++iter)
    17 for (TDbColSetIter iter(*set);iter;++iter)
    14     {
    18     {
    15     if ((iter-&gt;iAttributes&amp;TDbCol::ENotNull)==0)
    19     if ((iter-&gt;iAttributes&amp;TDbCol::ENotNull)==0)
    16         ++nullable;
    20         ++nullable;
    17     }</codeblock> </section> </conbody></concept>
    21     }</codeblock> </section>
       
    22 </conbody></concept>