CDbStrings Class Reference

#include <d32dbms.h>

Link against: edbms.lib

class CDbStrings : public CBase

Inherits from

  • CDbStrings

    Detailed Description

    CDbStrings encapsulates functionality used for transferring an array of strings from DBMS server to the DBMS client. The maximal length of each element of the array is KDbMaxStrLen characters. The typical usage pattern of CDbStrings class is:
    CDbStrings* strings = <a call of an exported DBMS method>;
    TInt cnt = strings.Count();
    for(TInt i=0;i<cnt;++i)
    	{
    	const TDesC& str = (*strings)[i];
    	<do something with "str" variable>;
    	}
    delete strings;

    Constructor & Destructor Documentation

    ~CDbStrings ( )

    ~CDbStrings()[virtual]

    Member Function Documentation

    AddL ( const TDesC & )

    voidAddL(const TDesC &aStr)
    Adds a string to the array.
    leave
    KErrNoMemory - Out of memory.
    ParameterDescription
    aStrString to be added to the array.

    Count ( )

    TInt Count()const [inline]

    Returns: The number of elements of the controlled strings array.

    NewLC ( )

    CDbStrings *NewLC()[static]
    Standard phase-one creation method for CDbStrings objects.
    leave
    KErrNoMemory - Out of memory.

    Returns: A pointer to the created CDbStrings object.

    operator[] ( TInt )

    const TDesC &operator[](TIntaIndex)const [inline]

    Allows access to "aIndex" element of the controlled strings array.

    Returns: "aIndex" element of the controlled strings array.