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 13.1 ('iOS First Look')
Instant purchase and download via GumRoad!


Data Access

Three Paradigms for Data Access in Xojo

Issue: 13.1 (January/February 2015)
Author: Kevin Cully and Scott Boss
Author Bio: Kevin Cully currently is owner of CULLY Technologies, LLC. He leads the Atlanta Xojo Users Group and is an avid Xojo developer on Linux and other Xojo target platforms.
Article Description: No description available.
Article Length (in bytes): 18,493
Starting Page Number: 21
Article Number: 13104
Related Web Link(s):


Excerpt of article text...

Today we're not going to talk about different databases—SQLite, PostgreSQL, MySQL, Oracle, etc.—but about the programming side of data access.

There are three approaches that we are going to discuss: SQL Pass Through, Prepared SQL Statement, and Object Relational Mapping. We're hoping this gives you an insight into the pluses and minuses of each approach to help you get started programming in Xojo using databases.

If you want to know more about SQL beyond the scope of this article, there is a huge volume of information on the Internet for you to reference.

Database Fundamentals

First, let us discuss database operations from the very beginning with the fundamentals. Databases are used to permanently store data and subsequently retrieve that data. The way to ask for data is typically called SQL or "Structured Query Language." There are only a couple of basic database operations: SELECT, INSERT, UPDATE, and DELETE. The INSERT, UPDATE, and DELETE operations deal with manipulating data. The SELECT operation deals with returning data or querying data. When we execute a SELECT statement, we expect to get a recordset back in Xojo. For INSERTs, UPDATEs, and DELETEs we check if there was an error after the operation by checking the error property on the database connection.

Approach 1: SQL Pass Through

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