sqldb.h File Reference

KSqlLastInsertedRowId

const TIntKSqlLastInsertedRowId

Used to specify that the ROWID of the most recently inserted record from the specified database connection should be used as the ROWID in a call to directly access a blob.

See also: RSqlBlobReadStream RSqlBlobWriteStream TSqlBlob

Enum TSqlColumnType

An enumeration whose values represent the supported database column types.

See also: RSqlStatement::ColumnType()

EnumeratorValueDescription
ESqlNull

Null column value.

ESqlInt

32-bit integer column value.

ESqlInt64

64-bit integer column value.

ESqlReal

64-bit floating point column value.

ESqlText

Unicode text, a sequence of 16-bit character codes.

ESqlBinary

Binary data, a sequence of bytes.

Enum TSqlRetCodeClass

Defines a set of categories for the values returned by the SQL API.

A call to an SQL API may complete with a non-zero return code indicating that some unexpected behaviour has occurred. This can be categorised in a number of ways, for example, as a Symbian OS error, or as a database error etc.

Callers to the SQL API may not want to be concerned with the detailed meaning of a specific return code value, and may find it sufficient just to know the category of the error.

The category associated with a specific return code can be found by passing the return code value to the function SqlRetCodeClass().

EnumeratorValueDescription
ESqlInformation

Indicates that a return code is just for information.

This category corresponds to the SQL API return codes: KSqlAtRow and KSqlAtEnd.

See also: SqlRetCodeClass() TSqlRetCodeClass KSqlAtRow KSqlAtEnd

ESqlDbError

Indicates that a return code represents a database-specific error.

This category corresponds to SQL API return codes in the range KSqlErrGeneral to KSqlErrStmtExpired.

See also: SqlRetCodeClass() TSqlRetCodeClass KSqlErrGeneral KSqlErrStmtExpired

ESqlOsError

Indicates that a return code represents a Symbian OS error.

This category corresponds to SQL API return codes in the range KErrPermissionDenied to KErrNone,

See also: SqlRetCodeClass() TSqlRetCodeClass KErrPermissionDenied KErrNone

KSqlAtRow

const TIntKSqlAtRow

An information type return code from a call to RSqlStatement::Next().

It means that the RSqlStatement object points to a valid row, and that the user can access the column data using the appropriate RSqlStatement member functions.

See also: RSqlStatement::Next() RSqlStatement ESqlInformation TSqlRetCodeClass

KSqlAtEnd

const TIntKSqlAtEnd

An information type return code from a call to RSqlStatement::Next().

It means that the RSqlStatement object does not point to a valid row, and that column data accessors cannot be used.

See also: RSqlStatement::Next() RSqlStatement ESqlInformation TSqlRetCodeClass

KSqlErrGeneral

const TIntKSqlErrGeneral

An SQL database-specific error type return code from a call to the SQL API.

It indicates a general SQL error or a missing database.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrInternal

const TIntKSqlErrInternal

An SQL database-specific error type return code from a call to the SQL API.

It indicates an internal logic error in the SQL database engine, and specifically that an internal consistency check within the SQL database engine has failed.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrPermission

const TIntKSqlErrPermission

An SQL database-specific error type return code from a call to the SQL API.

It indicates that access permission has been denied.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrAbort

const TIntKSqlErrAbort

An SQL database-specific error type return code from a call to the SQL API.

It indicates an internal logic error in the SQL database engine, and specifically that a callback routine requested an abort.

KSqlErrBusy

const TIntKSqlErrBusy

An SQL database-specific error type return code from a call to the SQL API.

It indicates that the database file is locked.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrLocked

const TIntKSqlErrLocked

An SQL database-specific error type return code from a call to the SQL API.

It indicates that a table in the database is locked.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrReadOnly

const TIntKSqlErrReadOnly

An SQL database-specific error type return code from a call to the SQL API.

It indicates an attempt to write to a database that is read-only.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrInterrupt

const TIntKSqlErrInterrupt

SQL database-specific error type. Operation terminated.

KSqlErrIO

const TIntKSqlErrIO

An SQL database-specific error type return code from a call to the SQL API.

It indicates that a disk I/O error has occurred.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrCorrupt

const TIntKSqlErrCorrupt

An SQL database-specific error type return code from a call to the SQL API.

It indicates that the database disk image is malformed.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrNotFound

const TIntKSqlErrNotFound

SQL database-specific error type. Table or record not found.

KSqlErrFull

const TIntKSqlErrFull

An SQL database-specific error type return code from a call to the SQL API.

It indicates that an insertion operation has failed because an autoincrement column used up all awailable rowids.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrCantOpen

const TIntKSqlErrCantOpen

An SQL database-specific error type return code from a call to the SQL API.

It indicates a failure to open the database file.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrProtocol

const TIntKSqlErrProtocol

An SQL database-specific error type return code from a call to the SQL API.

It indicates a database lock protocol error.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrEmpty

const TIntKSqlErrEmpty

An SQL database-specific error type return code from a call to the SQL API.

It indicates that the database is empty.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrSchema

const TIntKSqlErrSchema

An SQL database-specific error type return code from a call to the SQL API.

It indicates that a prepared SQL statement is no longer valid and cannot be executed.

The most common reason for this return code is that the database schema was modified after the SQL statement was prepared. The SQL statement must be prepared again using the RSqlStatement::Prepare() member functions.

Another possible reason for this return code is a detached database.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrTooBig

const TIntKSqlErrTooBig

SQL database-specific error type. Too much data for one row.

KSqlErrConstraint

const TIntKSqlErrConstraint

An SQL database-specific error type return code from a call to the SQL API.

It indicates an abort due to constraint violation.

"Constraint violation" means violation of one or more column constraints ("NOT NULL", "PRIMARY KEY", "UNIQUE", "CHECK", "DEFAULT", "COLLATE" SQL keywords) or table constraints ("PRIMARY KEY", "UNIQUE", "CHECK" SQL keywords).

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrMismatch

const TIntKSqlErrMismatch

An SQL database-specific error type return code from a call to the SQL API.

It indicates a data type mismatch.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrMisuse

const TIntKSqlErrMisuse

An SQL database-specific error type return code from a call to the SQL API.

It indicates an internal logic error in the SQL database engine.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrRange

const TIntKSqlErrRange

An SQL database-specific error type return code from a call to the SQL API.

It indicates that a parameter index value is out of range.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrNotDb

const TIntKSqlErrNotDb

An SQL database-specific error type return code from a call to the SQL API.

It indicates that the file that has been opened is not a database file.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

KSqlErrStmtExpired

const TIntKSqlErrStmtExpired

An SQL database-specific error type return code from a call to the SQL API.

It indicates that an SQL statement has expired, and needs to be prepared again.

See also: RSqlStatement ESqlDbError TSqlRetCodeClass

SqlRetCodeClass ( TInt )

IMPORT_C TSqlRetCodeClassSqlRetCodeClass(TIntaSqlRetCode)