CSqlExample Class Reference

List of all members.

Public Member Functions

 ~CSqlExample ()
void CreateNonSecureDBL ()
void CreateAndOpenSecureDBL ()
void CopyDatabaseL ()
void AttachDatabasesL ()
void DataTypesQueryL ()
void ScalarFullSelectL ()
void ColumnBinaryStreamL ()
void DeleteL ()

Static Public Member Functions

static CSqlExampleNewLC ()

Detailed Description

Demonstrates some uses of the Symbian platform SQL component.

The class demonstrates how to

Definition at line 55 of file sqlexample.h.


Constructor & Destructor Documentation

CSqlExample::~CSqlExample (  ) 

Destructor

Definition at line 102 of file sqlexample.cpp.


Member Function Documentation

CSqlExample * CSqlExample::NewLC (  )  [static]

Allocates and constructs a CSqlExample object and leaves it on the cleanup stack. Initialises all member data to their default values.

Definition at line 77 of file sqlexample.cpp.

void CSqlExample::CreateNonSecureDBL (  ) 

Creates a non secure database, which has a table with two integers, and closes it. It is deleted at a later point of time after the copy operation. KErrNotFound, KErrAbort, KErrPermissionDenied, KErrArgument, system-wide error codes.

Definition at line 116 of file sqlexample.cpp.

void CSqlExample::CreateAndOpenSecureDBL (  ) 

Creates a secure database with a table and a certain security policy. Inserts a record, opens it and closes the database. The database is reopened later and hence not deleted here. KErrNone, KErrNoMemory, KErrBadName, KErrNotReady, KErrInUse, KErrNotFound, KErrGeneral, KErrPermissionDenied, KErrNotSupported, ESqlDbError, system-wide error codes

Definition at line 143 of file sqlexample.cpp.

void CSqlExample::CopyDatabaseL (  ) 

Essentially a file copy to allow users to copy a database from one file to another. SQL provides a mechanism to copy secure databases, (which live in the SQL private datacage) as a user is not allowed to do that. The source database is then deleted after copying it to the destination. KErrAbort, KErrPermissionDenied, KErrArgument, system-wide error codes.

Definition at line 187 of file sqlexample.cpp.

void CSqlExample::AttachDatabasesL (  ) 

Opens a secure database and attaches a non secure database to it. Database has to be open before an attach can be executed. KErrNoMemory, KErrBadName, KErrNotReady, KErrInUse, KErrNotFound, KErrGeneral, KErrPermissionDenied, KErrNotSupported, ESqlDbError, system-wide error codes

Definition at line 233 of file sqlexample.cpp.

void CSqlExample::DataTypesQueryL (  ) 

Prepares and executes both a simple query and a query with parameters. KErrNoMemory, KErrBadName, KErrNotReady, KErrInUse, KErrNotFound, KErrGeneral, KErrPermissionDenied, KErrNotSupported, ESqlDbError, system-wide error codes.

Definition at line 273 of file sqlexample.cpp.

void CSqlExample::ScalarFullSelectL (  ) 

1) Prepares and executes a query with a large parameter, writing that parameter using streaming (RParamWriteStream) 2) Creates a database with a table containing integer, 64-bit integer, float, text and Blob fields. 3) Inserts two records. 4) Implements TSqlScalarFullSelectQuery functions for 64 bit integer and text fields and checks the returned value. KErrNoMemory, KErrBadName, KErrNotReady, KErrInUse, KErrNotFound, KErrGeneral, KErrPermissionDenied, KErrNotSupported, ESqlDbError, system-wide error codes

Definition at line 344 of file sqlexample.cpp.

void CSqlExample::ColumnBinaryStreamL (  ) 

Prepare and execute a query which returns data, and read that data using streaming (RColumnReadStream) KErrNoMemory, KErrBadName, KErrNotReady, KErrInUse, KErrNotFound, KErrGeneral, KErrPermissionDenied, KErrNotSupported, ESqlDbError, system-wide error codes.

Definition at line 463 of file sqlexample.cpp.


Generated by  doxygen 1.6.2