Basic SQL Example: basicsqlexample.h

A copy of the basicsqlexample.h file for the basic SQL example application.


The program class and functions are declared in this file.


Declares the program structure.

// basicsqlexample.h
// Copyright (c) Nokia Ltd 2009. All rights reserved.

Contains the CBasicSqlExample class.

#include <e32base.h> 
Demonstrates some uses of the Symbian platform SQL component.
The class demonstrates how to 
- Create a database
- Populate a database
- Query a database
class CBasicSqlExample: public CBase
    static CBasicSqlExample* NewLC();

    void ExampleL();
private:    // Utility/Basic Methods
    void DoExampleL();
    void ConstructL();
    void Prompt();
    void Prompt(const TDesC& aText);
private:    // Example Methods
    void OpenDatabaseL();
    void SqlQueryL(const TDesC& aStatement);
    void CloseDatabase();
    void DeleteDatabase();
    void CreateDatabaseL();
    void PopulateDatabaseL();
    RSqlDatabase iPetDb;

    /** Pointer to the console interface */
    CConsoleBase* iConsole;