Login   Register  
Icontem

File: readme

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sergei Selihov  >  SQLite Connector Class  >  readme  >  Download  
File: readme
Role: Documentation
Content type: text/plain
Description: Readme file with example
Class: SQLite Connector Class
Access SQLite databases from AIR applications
Author: By
Last change:
Date: 2010-09-16 12:10
Size: 828 bytes
 

Contents

Class file image Download
Files:

LICENSE.txt - Open Software License ("OSL") v. 3.0 text
jlcSQLiteDBConnector.js - SQLite database connector class 

Example:

var CurDBConnector = new jlcSQLiteDBConnector();
var tmpDBFile = air.File.applicationStorageDirectory.resolvePath('database\\main1.db');
var tmpSQLQuery = '';
   
var Counter1 = 0;
    
try
  {
  CurDBConnector.CreateDBFile(tmpDBFile, true, 'update');
  }
catch (usrError)
  {
  return false;
  }    
    
try
  {  
  tmpSQLQuery =     
    
  "CREATE TABLE IF NOT EXISTS deluxe_coachwork_link (" +  
  "    id INTEGER PRIMARY KEY AUTOINCREMENT, " +  
  "    sportsmenwork INTEGER, " +  
  "    coachwork INTEGER " +  
  ")";

  CurDBConnector.SetQuery(tmpSQLQuery);
  CurDBConnector.ExecuteQuery(tmpSQLQuery);
  }

catch(usrError)
  {
  return false;
  }