#include <d32dbms.h>
| class CDbColSet : public CBase | 
| Public Member Functions | |
|---|---|
| CDbColSet() | |
| ~CDbColSet() | |
| IMPORT_C CDbColSet & | AddL(const TDbCol &) | 
| void | Clear() | 
| IMPORT_C const TDbCol * | Col(const TDesC &) | 
| IMPORT_C TDbColNo | ColNo(const TDesC &) | 
| TInt | Count() | 
| IMPORT_C CDbColSet * | NewL() | 
| IMPORT_C CDbColSet * | NewLC() | 
| IMPORT_C void | Remove(const TDesC &) | 
| const TDbCol & | operator[](TDbColNo) | 
Manages a set of column definitions which describe a table or rowset structure. Column definitions can be added and removed. The set can be iterated over, and ordinals for a column can be looked up.
The class is not intended for user derivation.
Returns the ordinal for a particular column name in this column set. If such a column does not exist in the set the special ordinal KDbNullColNo is returned.
This function is particularly important when accessing data through a rowset. If the set of columns to be returned by a rowset is not explicitly specified, no assumptions should be made about the ordering of the columns returned. In such a case, in order to access the column data a column ordinal is required, and this can be obtained by using this function on the column set returned by RDbRowSet::ColSetL().
| Parameter | Description | 
|---|---|
| aColName | The name of the column to find. | 
Returns: The ordinal number of the column.
| TInt | Count | ( | ) | const [inline] | 
Returns the number of column definitions in the set.
Note that using a TDbColSetIter is another way to iterate through the contents of a CDbColSet.
Returns: The number of columns in the columns set.
| IMPORT_C CDbColSet * | NewL | ( | ) | [static] | 
Constructs a new empty column set and returns a pointer to it.
Returns: A pointer to the column set object.
| IMPORT_C CDbColSet * | NewLC | ( | ) | [static] | 
Constructs a new empty column set and returns a pointer to it placing the pointer onto the cleanup stack. This allows the column set object and allocated resources to be cleaned up if a subsequent leave occurs.
Returns: A pointer to the column set object.
| IMPORT_C void | Remove | ( | const TDesC & | aColName | ) | 
Removes the named column from the set.
| Parameter | Description | 
|---|---|
| aColName | The name of the column to remove from the set. | 
Returns a column definition by its ordinal number in the set.
Note that using a TDbColSetIter is another way to iterate through the contents of a CDbColSet.
| Parameter | Description | 
|---|---|
| aCol | The ordinal number of the column in the set. Columns in a column set are numbered from 1 to Count(), unlike Symbian OS array classes. Ordinal 0 is reserved to represent the invalid column number KDbNullColNo. | 
Returns: The column definition requested.