Skip to content

Simple Database and Data access in Delphi XE5 for iOS and Android

With the release of Delphi XE5 for iOS and Android developers now have several options for connecting to databases and data both on the devices themselves as well as via our DataSnap multi-tier technology, REST application services, REST, SOAP and XML (TXMLDocument).  You can directly use SQLite, InterBase IBLite/IBToGo in your iOS and Android applications via the FireDAC, dbExpress and InterBase Express (IBX) non-visual components.  As always you can see you data connections live at design time in the IDE and then compile and run the apps for all platforms supported. You can also directly use XML data and parse it using the ADOM XML parser.  The same project and same code works on iOS and Android (and on OSX and Windows) for these datasets and datasources.  You can also build thin client applications using our DataSnap technology to connect mobile applications to Windows DataSnap servers that can then use FireDAC, dbExpress, InterBase Express (IBX) to quickly get to remote and local SQL databases.

You can find numerous tutorials, videos and articles in the Embarcadero DocWiki, Mobile Code Snippets, FireMonkey Mobile Samples, CodeRage Mobile sessions and on EDN that will show you how quick and easy it is to use data in your iOS and Android apps.  Here are a few links to help you get started.

Short Videos

CodeRage Mobile Videos

Mobile Tutorials and Articles

The quickest way to get started is to download the free trial of RAD Studio XE5, install it and check out some of the mobile code snippets, especially the ones listed above.  All of the RAD Studio XE5 demo code, samples and code snippets are also available on SourceForge at http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE5/. After you install the trial, you will also find short videos on the IDE "Start Here" pages (for iOS and Android) that give you a quick introduction to some of the mobile code snippets and FireMonkey mobile samples.

{ 6 } Comments

  1. Doug Downs | October 3, 2013 at 4:35 am | Permalink

    Is it possible to connect from a FireMonkey Mobile Application to an existing RemoteDataModule that has traditionally been accessed from a DCOMConnection via a Windows application?

  2. davidi | October 3, 2013 at 5:19 am | Permalink

    Doug - Delphi mobile does not know about DCom. You can migrate your Dcom based remote module to a DataSnap server running on Windows and then connect a Delphi mobile client to that datasnap server. Jon Robertson gave a talk at CodeRage 5 showing how to migrate a DCom Remote Module to a DataSnap server.

    "Learn some of the challenges and solutions of migrating mature DCOM DataSnap servers to the new dbExpress DataSnap architecture." by Jon Robertson - http://www.embarcadero.com/coderage/coderage-5-speakers#robertsonj

    Watch the session video replay at http://edn.embarcadero.com/article/41014

  3. Doug Downs | October 4, 2013 at 2:34 pm | Permalink

    Thanks David. I’ve made a lot of progress with your help.

    One question… How do I create a datasnap server app that starts automatically when the server boots up like DCOM did (without having to start it manually like a .exe)?

  4. Doug Downs | October 5, 2013 at 1:01 pm | Permalink

    In the DataSnap wizard, I presume I would select Service Application on the DataSnap Server - Project Type dialog box and run it as a windows service?

  5. davidi | October 7, 2013 at 2:34 pm | Permalink

    Doug:

    Three choices for projects using the project templates: DataSnap REST Application, DataSnap Server, DataSnap Web Broker. Within the DataSnap Server Project Template wizard you can choose VCL, Console and Service Application. You can also just create a, VCL application, FireMonkey application, Console application or a Service Application and then add the DataSnap non-visual components to your application: TDSServer, TDSServerClass and Server Transports (TCP, HTTP, HTTPS).

    If you build an App - you can put it in your Startup Folder. If you build a Service, then you can set service to Automatic so that it starts.

    On the TDSServer component there is a property "AutoStart" to start the DataSnap server immediately, or you could have a timer that would start and stop the DataSnap Server for periods of time when you want it to respond to DataSnap client requests.

    You have all the choices.

  6. Doug Downs | October 12, 2013 at 4:33 pm | Permalink

    I am trying to SaveToFile from a ClientDataSet on Android. When launched on my Galsxy Note 2, I am getting the error message ‘Cannot create file "/Streets.xml". Read-only file system.’

    I have checked to see that write to external storage is true on the options. I am using the 30 day evaluation version of RAD Studio. I don’t know if it has limitations on this option like it does on InterBase.

Bad Behavior has blocked 4 access attempts in the last 7 days.

Close