Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 4.4

COLUMN

Databases for Real

REALSQLDatabase (SQLite)

Issue: 4.4 (March/April 2006)
Author Bio: Paul Lefebvre is President and Chief Software Architect of LogicalVue Software, makes of SQLVue, UltraToolBar and RBUnit.
Article Description: No description available.
Article Length (in bytes): 7,061
Starting Page Number: 36
Article Number: 4414
Related Web Link(s):

http://www.sqlite.org
http://sqlite.org/lang_createtable.html

Excerpt of article text...

We're going to spend the next few columns focusing in more detail on specific features of the REALSQL Database that is now included with REALbasic 2005. REALSQL is the third version of a REALbasic database format and I think the adage "the third time is the charm" applies here. REALSQL is based on SQLite 3 (http://www.sqlite.org), a fast and powerful open-source database engine. Previously, SQLite (version 2) was available to REALbasic developers via the SQLitePluginPro database plug in from SQLabs. In early 2005, REALbasic purchased this plugin (and other related technologies) from SQLabs for inclusion in REALbasic 2005. Considering that this plugin sold for about $100, it is quite a bargain to have it included with REALbasic.

REALSQL supports all the commands that SQLite supports. Table 1 is a list of all the commands grouped into categories. But before we jump right into our first category, Tables, we ought to take care of a some REALbasic housekeeping.

In order to start working with any of these exciting SQLite commands, you need to create a REALSQL database. This is not hard at all as we'll see in some sample code. All access with REALSQL databases is coincidentally done through the REALSQLDatabase class. Once we have an instance of that class, we can assign it to a folder item and choose to create a new database. For example:

...End of Excerpt. Please purchase the magazine to read the full article.