Fearless Cross-Platform Development with Delphi by David Cornelius

Fearless Cross-Platform Development with Delphi by David Cornelius

Author:David Cornelius [David Cornelius]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2021-10-22T00:00:00+00:00


Getting table and query records from SQLite

This process is similar for preparing the MobileSalesSQLite project, but the initial set of instructions will be repeated here for completeness and to cover a few unique aspects of SQLite:

Double-click the TFDConnection component in the project's data module.

Select SQLite for Driver ID.

Select the chinook.db file you downloaded earlier for the Database parameter.

Click the Test button (you'll be prompted for user credentials, just like you were for the InterBase connection, but you can leave the fields blank as there is no user security for SQLite).

If all is well, clicking OK will confirm that the database can be accessed.

Uncheck the LoginPrompt property in the Object Inspector window.

Add a TFDTable component to the data module and ensure its connection gets automatically assigned to the TFDConnection component.

Set the Table property to invoices by selecting it from the dropdown list of tables found in the SQLite database, and set its Active property to True.We'll use a TStringGrid again as it plays better with LiveBindings. We can use the LiveBindings Wizard to set this up for us, but since the tab control is an aligned client, we can't right-click on the form to get to the LiveBindings Wizard in the right context; launching the wizard from the LiveBindings Designer gives us the options we need, so we'll go there first.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.