Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using SQLite


Databases are advanced data repositories known as relational database management systems. SQLite is an embedded database that can be used in your LiveCode mobile apps, giving you tremendous capability to store, retrieve, and manipulate data. Unlike MySQL databases, SQLite databases do not require a server. In this recipe, we will create a mobile app that uses five SQLite functions:

  1. Connect to a database.

  2. Add a table to the database.

  3. Add data to the database table.

  4. Retrieve data from the database.

  5. Close the database.

How to do it...

Use the following steps to create a mobile app that instantiates a SQLite database and add and retrieve information from it:

  1. Create a new main stack in LiveCode.

  2. Set the background color of the main card to black.

  3. Open the Standalone Application Settings dialog box and click on the iOS tab.

  4. Check the SQLite checkbox by navigating to Basic Application Settings | Externals. See the following screenshot for reference:

  5. Open the Standalone Application Settings dialog...