![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
CBase |
Abstract: CBase behavior |
CCommDbOverrideSettings |
Override settings |
cdbover.h
commdb.lib
Use an object of this type as a repository of override settings for columns in tables.
static CCommDbOverrideSettings* NewL(TParamList aParamList);
Use this static function to allocate and construct an override settings object.
The construction process automatically opens the communications database and connects to the DBMS. The database is closed and the connection to the DBMS is severed when this override object is destroyed.
TParamList aParamList |
An enumerator which declares whether the new override settings object is to be full or partial. |
CCommDbOverrideSettings* |
A pointer to the new override settings object. |
~CCommDbOverrideSettings();
The destructor frees all resources owned by this object, prior to its destruction.
Specifically, it closes the communications database and severs the connection with the DBMS.
TInt SetIntOverride(const TDesC& aTableName, const TDesC& aColumnName, TUint32 aValue);
Use this function to set an override value for the column whose name is supplied in the descriptor aColumnName in the table whose name is given in descriptor aTableName.
If the column name is empty, i.e. the length of the descriptor aColumnName is zero, then the override value is assumed to be the overriding Id for the default record for table aTableName. This means that the table must be one which supports default records.
For the function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. If this descriptor is empty, i.e. its length is zero, then aValue is assumed to be the overriding Id for the default record. |
TUint32 aValue |
The override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotSupported is returned if the table does not support override settings. Support is restricted to:
KErrNotFound if:
or
or
KErrAlreadyExists if an override already exists. |
TInt SetBoolOverride(const TDesC& aTableName, const TDesC& aColumnName, TBool aValue);
Use this function to set an override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For the function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TBool aValue |
The override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotSupported is returned if the table does not support override values. Support is restricted to:
KErrNotFound if the column cannot be found. KErrAlreadyExists if an override for this column in this table already exists. |
TInt SetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC8& aValue);
Use this function to set an override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For the function to succeed:
In addition, the maximum length of text expected by this function is the value of the constant KCommsDbSvrMaxFieldLength defined in cdblen.h
. The length of aValue supplied by the caller cannot be greater than this value.
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
const TDesC8& aValue |
The override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotSupported is returned if the table does not support override values. Support is restricted to:
KErrNotFound if the column cannot be found. KErrAlreadyExists if an override for this column in this table already exists. KErrOverflow if the length of aValue is greater than KCommsDbSvrMaxFieldLength |
TInt SetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC16& aValue);
Use this function to set an override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For the function to succeed:
In addition, the maximum length of text expected by this function is the value of the constant KCommsDbSvrMaxFieldLength defined in cdblen.h
. The length of aValue supplied by the caller cannot be greater than this value.
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
const TDesC16& aValue |
The override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotSupported is returned if the table does not support override values. Support is restricted to:
KErrNotFound if the column cannot be found. KErrAlreadyExists if an override for this column in this table already exists. KErrOverflow if the length of aValue is greater than KCommsDbSvrMaxFieldLength |
TInt SetLongDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC& aValue);
Use this function to set an override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For the function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
const TDesC& aValue |
The override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotSupported is returned if the table does not support override values. Support is restricted to:
KErrNotFound if the column cannot be found. KErrAlreadyExists if an override for this column in this table already exists. |
TInt GetIntOverride(const TDesC& aTableName, const TDesC& aColumnName, TUint32& aValue);
Use this function to fetch the override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
If the column name is empty, i.e. the length of the descriptor aColumnName is zero, then the override value is assumed to be the overriding Id for the default record for table aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TUint32& aValue |
An unsigned integer type passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
TInt GetBoolOverride(const TDesC& aTableName, const TDesC& aColumnName, TBool& aValue);
Use this function to fetch the override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TBool& aValue |
A boolean type passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
TInt GetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes8& aValue);
Use this function to fetch the override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TDes8& aValue |
An 8 bit type descriptor passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
TInt GetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes16& aValue);
Use this function to fetch the override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TDes16& aValue |
A 16 bit type descriptor passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
TInt GetLongDesOverrideLength(const TDesC& aTableName, const TDesC& aColumnName, TInt& aLength);
Use this function to fetch the length of the long text override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TInt& aLength |
A signed integer type passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
TInt GetLongDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes& aValue);
Use this function to fetch the override value for the column whose name is supplied in descriptor aColumnName in the table whose name is given in descriptor aTableName.
For this function to succeed:
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumn |
A reference to a descriptor containing the name of a column in table aTableName. |
TDes& aValue |
A descriptor passed by the caller. On successful return from this function, it contains the override value. |
TInt |
KErrNone if successful, otherwise one of the system error codes. Specifically: KErrNotFound if:
|
The maximum length of the descriptor aValue must be large enough to contain the override text. Use the GetLongDesOverrideLength() function to find the length of this text.
TBool IsOverridden(const TDesC& aTableName, const TDesC& aColumnName, TValueType aType);
Use this function to determine whether an override value of type aType exists for the column whose name is supplied in descriptor aColumnName in the table whose name is given in the descriptor aTableName.
const TDesC& aTableName |
A reference to a descriptor containing the name of a table in the communications database. |
const TDesC& aColumnName |
A reference to a descriptor containing the name of a column in table aTableName which is to be overridden. |
TValueType aType |
An enumeration which indicates the type of data in column aType which is to be overridden. |
TBool |
true if the value is overridden, false otherwise. |
TParamList PartialFull() const;
Use this function to determine whether the override list is full or partial.
An enumeration which determines whether this set of override values is full or partial. |
The override settings are partial; the CCommDbOverrideSettings object maintains override values for only some of the columns. |
|
The override settings are full; the CCommDbOverrideSettings object maintains override values for all columns |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |