Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

Simplify Interbase Database Deployment For Android And IOS With Delphi XE5 Firemonkey

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

interbase | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSEmbarcadero has a blog post up where they show how to create Interbase databases at runtime. This greatly simplifies deploying a database to mobile and also allows you to easily switch between using Interbase or SQLite. Personally I would always choose SQLite over Interbase because if you ever need to switch your app to use a different development environment SQLite is more widely supported (Adobe AIR for example also supports SQLite). In any event the code is easy enough to understand and the important lines for creating the Interbase database at runtime are:
DBPath := TPath.GetDocumentsPath+PathDelim+'interbase'+PathDelim+'MyDB.ib';
FDConnection1.Params.Values['Database'] := DBPath;
FDConnection1.Params.Values['CreateDatabase'] := BoolToStr(not FileExists(DBPath),True);

Head over and check out the full runtime Interbase database tutorial.

Exit mobile version