Basic SQL Example: basicsqlexample.h

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

Introduction

The program class and functions are declared in this file.

Code

Declares the program structure.

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

/**
@file
Contains the CBasicSqlExample class.
*/
#ifndef __BASICSQLEXAMPLE_H__
#define __BASICSQLEXAMPLE_H__

#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
    {
public:
    static CBasicSqlExample* NewLC();

    ~CBasicSqlExample();
    void ExampleL();
    
private:    // Utility/Basic Methods
    void DoExampleL();
    CBasicSqlExample();
    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();
    
private:
    RSqlDatabase iPetDb;

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

#endif //__BASICSQLEXAMPLE_H__