Quality Interior Design
 
EzTools Software Logo Quality Windows Programming Tools
Because Presentation is Everything
   Access any SQL database through
your webserver with SqlWeb.NET
for .NET, Silverlight and Windows Phone 7
 
Home Buy Support Services About Us

SQLite++ Cross Platform C++ Class Library

 

  Database Products
SqlWeb.NET DLL  
SQLitePlus & SQLite++  
Database Explorer  
COM DLL  
SQLite++  
Compression & Encryption  
Stored Scripts  
Grid ActiveX  
FAQ  
Licensing  
FileDb Simple .NET Database  
  HSP System
Overview  
HTML Scripting Pages  
EzWeb Compiler  
EzWeb Copy Protection  
  ActiveX & .NET Components
EditListView Enhanced ListView  
WOW WebBrowser  
BrowserList HTML Listbox  
HotButton ActiveX  
HotLink HTML HyperLink  
HotList HTML Listbox  
SuperCombo HTML Droplist  
TabStrip ActiveX  
  Other Products
ConfigDb  
RegDb COM DLL  
Zip COM DLL  
EzComm Messaging DLL  
EasyScript.NET  

 

  Setup

  Source code

FREE C++ wrapper library for SQLite

SQLite++ is now FREE to use source code, with no restrictions.  First download/install the setup then open the Source Code and follow the instructions in the Zip file.

SQLite++ is meant to be a cross-platform C++ wrapper library for SQLite*.  It is designed to make using the SQLite C library easy without sacrificing performance.  SQLite++ also supports BLOBS, TwoFish encryption and ZLib compression**.

SQLite++ consists of 4 main classes and a few utility methods for encoding/decoding, encrypting/decrypting and compressing/decompressing data. These classes make it super-easy to begin using SQLite immediately without having to write lots of infrastructure code as you would otherwise need to do.  The main classes are:

  • SqliteDb
  • Dataset
  • Columns (Collection)
  • Column

Open and query a database with just a few lines of code.  Save yourself weeks of coding and debugging with this robust and easy to use class library.

SQLite++ uses standard C++ (no platform-specific code), and the Standard Template Library (STL).

* Due to differences between platform compilers and STL libraries, users report that you will need to make some changes to the code when not using MSC++.

** Note that you must obtain the ZLib library for your platform separately if you want
to use the compression methods.  SQLite++ is only tested with the Windows
version (available from
www.gzip.org).

Consider how easy it is to open a database and view the column names, types
and values of an entire table:


SqliteDb DB;
Dataset* pDS;
std::string sErr;

if( DB.open( "Northwind.db", 0, &sErr ) )
{
  if( DB.exec( "SELECT * FROM Categories", &pDS, &sErr ) == SQLITE_OK )
  {
    Column* pCol;
    Columns* pCols;

    pCols = pDS->getColumns();

    // move through the dataset

    while( !pDS->eof() )
    {
      pCol = pCols->first();

      while( pCol )
      {
        std::cout << "Name: " << pCol->name() << "\n";
        std::cout << "Type: " << pCol->type() << "\n";
        std::cout << "Value: " << pCol->value() << "\n\n";
        pCol = pCols->next();
      }
      pDS->moveNext();
    }
  }
  else
    std::cout << sErr;
}
else
  std::cout << sErr;

Access Columns by name or ordinal index:


// get column by ordinal index
pCol = pCols->getColumn(1);

// get column by name (case insensitive)
pCol = pCols->getColumn("CategoryName");


Move through a dataset forwards or backwards


pDS->moveLast();
while( !pDS->bof() )
{
  pCol = pCols->first();

  while( pCol )
  {
    std::cout << "Name: " << pCol->name() << "\n";
    std::cout << "Type: " << pCol->type() << "\n";
    std::cout << "Value: " << pCol->value() << "\n\n";
    pCol = pCols->next();
  }
  pDS->moveBack();
}


Move to any record number or get the number of rows


pDS->moveTo();

int nRows = pDS->numRows();


Efficient algorithm makes loading a row lightning fast.

ENCRYPTION and Compression

SQLite++ has added functions for compressing/decompressing and encrypting/decrypting, making it very easy to perform these functions on-the-fly.  The encryption type is TwoFish, and the compression type is ZLib.

How to use ENCRYPT and DECRYPT

To use direct encryption/decryption, you must first set the Cipher Key using the SqliteDb.setCipherKey property.  Here is how to use the new ENCRYPT and DECRYPT keywords:



UPDATE Customers SET LastName = ENCRYPT('Smith') WHERE CustomerId = 1

SELECT DECRYPT(LastName) FROM Customers WHERE UPPER(DECRYPT(LastName)) = 'SMITH'

UPDATE Customers SET Notes = COMPRESS('The customer was satisfied with the results blah blah blah') WHERE CustomerId = 1

SELECT DECOMPRESS(Notes) FROM Employees WHERE UPPER(DECRYPT(LastName)) = 'SMITH'




 

Copyright © EzTools Software2001-2010 All rights reserved. Trademarks and Disclaimer:
All trademarks belong to their respective companies.