I Wish I Knew How to … Program SQLite with Xojo API2 delves into the mystery of programming a back-end database.
The book is written as a guide and reference to Xojo programmers who program Desktop Applications in Windows and Mac. There are no plugins, dynamic link libraries (dll), COM, or Active X parts to add.
There are more than 20 chapters with over 400 pages with over 80 example programs.
Examples include opening RowSets, finding data, sorting, updating data, counting records, printing a report, deleting records, creating new records, creating reports, and more. Many screenshots have been added to show the results of the code with an index to help find topics quickly.
*This uses Xojo API2
All examples have been created with native Xojo code with Xojo 2020 r2.1. There is an older book for AP1 (Xojo 2014 – SQLite).
Specific updates to the book are to numerous to mention, and here is a list of general changes with January 2021 (2.0 Edition) that has major updates which are:
- Converted all examples to API 2 and updated code
- Datatype NULL is now called BLOB
- Update a large number of screen grabs with newer DB Browser for SQLite
- Make a new Example 3-2, create a sqlite database with Xojo code
- Make a new Example 3-3, create a sqlite database with a table and ID field
- OpenDialog is deprecated, using OpenFileDialog instead
- Value is deprecated, using Text instead
- MsgBox is deprecated, using MessageDialog.Show.
- Field is deprecated, using Column instead
- Field is deprecated, using RowSet instead
- SQLSelect is deprecated, using SelectSQL instead
- RecordSet is deprecated, using RowSet instead
- ErrorMessage is deprecated, using DatabaseException instead
- Replaced Dim (API1) to Var (API2)
- EOF is deprecated, using For Each x as DatabaseRow in RS instead and/or AfterLastRow
- LastIndex is deprecated, using LastAddedRowIndex instead
- HasHeading is deprecated, using HasHeader instead
- Cell is deprecated, CellValueAt is used instead
- DatabaseRecord is deprecated, DatabaseRow is used instead
- InsertRecord is deprecated, AddRow is used instead
- Delete is deprecated, using Remove instead
- CopyFileTo is deprecated, using CopyTo instead
- MaxHorizontalResolution is deprectated, using MaximumHorizontalResolution instead
- MaxVerticalResolution is deprecated, using MaximumVerticalResolution instead
- PageSetupDialog is deprecated, using ShowPageSetupDiaolog instead
- Date is deprecated, DateTime is used instead
- SaveAsDialog is deprecated, using SaveFileDialog instead
- CreateDatabaseFile is deprecated, using CreateDatabase instead
- SQLExecute is deprecated, using ExecuteSQL instead
- SleepCurrentThread is deprecated, using Thread.SleepCurrent instead
- Commit is deprecated, using CommitTransaction instead
- Rollback is deprecated, using RollbackTransaction instead
Updates to Version 2.1 – Feb 2021
- Grammatical changes
- Formatting changes
- Repopulated Example 8-1
- Performed many updates from CStr to ToString formatting
- Changed information on DPI for MaximumHorizontalResolution and MaximumVerticalResolution
- Remove the legacy Call function when no return value is needed for a method, on many examples
- Changed OLEException (Windows Only) to DatabaseException
- Write Ahead Logging is added in Example 25-2.
- Changed IntegerValue.ToString to StringValue
- Changed DoubleValue.ToString to StringValue
- Updated Example 15-3 to include a Table and three columns to allow 100 additions. Special thanks to Enric Herrera.
Removed extra brackets from dlg.ShowModal
More than twenty chapters and over 400 pages with greater than 80 examples that both show and describe the code. This book is in PDF format with example chapter folders containing Xojo source code and running examples.
Eugene Dakin is the author of many computer programming reference materials and has many years experience creating technical programs.
This is one of many books at Xojo Library. This book can be purchased at http://xojolibrary.com/ where many great Xojo resources are available.
Click to download the latest version of the Table Of Contents.