Skip to Main Content
Adobe AIR 1.5 Cookbook
book

Adobe AIR 1.5 Cookbook

by Rich Tretola, David Tucker, Marco Casario, Koen DeWeggheleire, Koen De Weggheleire
November 2008
Beginner to intermediate content levelBeginner to intermediate
446 pages
10h 38m
English
O'Reilly Media, Inc.
Content preview from Adobe AIR 1.5 Cookbook

Chapter 10. Embedded SQL Database Programming

Adobe AIR doesn’t include only Flash Player to execute SWF content and only the WebKit engine to load HTML content and JavaScript. AIR also has an embedded version of the SQLite database engine that makes the runtime truly complete; SQLite gives developers the opportunity to store data locally offline and to do it via the same language they use to store data for web applications: SQL.

Widely used across platforms, SQLite is an open source, award-winning database engine that implements the SQL-92 specifications (http://www.sqlite.org/omitted.html).

SQLite in Adobe AIR gives applications the ability to persistently store data and easily manage it. This data can be stored locally in offline situations but then can be synchronized with network data store. With the 1.5 version of Adobe AIR, it isn’t possible, however, to natively connect to remote databases.

To be able to access, store, and manipulate data in a SQLite database in Adobe AIR, you first must create the database as a local file. Each database needs its own local file. The AIR SDKs contain the APIs you need to work with SQLite via ActionScript or JavaScript. For ActionScript code, SQL database classes are in the flash.data package, whereas for JavaScript, the classes can be directly instanced by using AIR aliases (you just have to import the AIRAliases.js file into your HTML document).

Creating a Database

Problem

You need to create a local database using SQLite.

Solution

Create a local ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Breaking Out of the Web Browser with Adobe AIR

Breaking Out of the Web Browser with Adobe AIR

Jeff Tapper, Michael Labriola, Peter Dilillo, Tom Kaczanko, Andriy Kupriyenko, Louie Penaflor, Mike Nimer, Nathan Weber, Steve Zimmers
Adobe AIR Programming Unleashed

Adobe AIR Programming Unleashed

Stacy Tyler Young, Michael Givens, Dimitrios Gianninas

Publisher Resources

ISBN: 9780596156145Supplemental ContentErrata Page