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 20.2 ('Colorominoes')
Instant purchase and download via GumRoad!

COLUMN

Triggers and Orphans

A Brief Discussion on SQL

Issue: 20.2 (March/April 2022)
Author: Vince Du Beau
Author Bio: Vince is an experienced Filemaker developer. He is exploring XOJO as an alternative to Filemaker.
Article Description: No description available.
Article Length (in bytes): 3,915
Starting Page Number: 84
Article Number: 20209
Related Link(s): None

Excerpt of article text...

Triggers are used to initiate an action during certain database events such as an insert, update, or delete. They can be designed to occur either before or after the event.

Developers usually design them to work at the row level. They can also be specified to run based on a specific statement.

I worked on a project a few years back when using UUIDS (Universally Unique IDs) was all the rage in the Filemaker community for primary keys. I wanted to see if I could do it with SQLite. An example trigger to create a UUID when inserting a new customer record follows:

`CREATE TRIGGER CustomerGenerateGUID

AFTER INSERT ON Customer

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