Deploying your database
Database deployment could be a deciding factor for which database you select for your mobile app. If you own the Enterprise or Architect versions of Delphi, you have a license to deploy IBToGo on mobile devices (IBToGo for desktop platforms is sold separately); otherwise, you either need to purchase distributable licenses from a reseller, use IBLite, or use a different database such as SQLite.
Regardless of which one you choose, the database file itself will need to be deployed – unless you're creating it from scratch once the application has been installed on the mobile device. The project deployment feature of Delphi automatically places support files where they need to go, so all we need to do is add the file to the project and then use a platform-aware function in the IOUtils
unit, TPath.GetDocumentsPath
, which embeds the Application ID as part of the folder name on mobile devices. That function should be called in the BeforeConnect
event...