cplusDBAction 4.2 Copyright addoit GmbH 2009
In Picture 11: Indexing Using a
Numerical Index you have a sample which iterates through the
container in an array-like manner. The internal cursor remains unchanged.
094: std::stringstream
text;
095:
096: // Perform a simple
select on the "DeclarationType" table belonging to the
097: // "m_pDBGenType"
Table Set
098: clsCollDeclarationType* pCollDeclType = clsDeclarationType::Select(m_pDBGenType);
099:
100: if (pCollDeclType !=
NULL)
101: {
102: // Index the items in
the collection using a numerical index
103: for ( long lIndex = 0; lIndex < pCollDeclType->Count(); lIndex++ )
104: {
105: clsDeclarationType*
pDeclType = pCollDeclType->ItemAt(lIndex);
106: text << "Item number " << lIndex <<
":
" << pDeclType->DB_DeclarationType()
107: << std::endl;
108: }
109: }
Picture 11: Indexing
Using a Numerical Index
Related Topics