Connecting from iPhone to Firebird

During the Friday I realized, that I did a long time nothing with my iPhone & MonoTouch development environment and I should try something more challenging. As I’m still fighting with some good idea for real world test application and my UIs are looking weird, I decided to turn my attention not to iPhone app directly, but to MonoTouch capabilities.

As a true geek I decided to try to connect to Firebird from iPhone. Although, thinking about it, I’m trying to connect to Firebird (or make it work with) with various technologies (Astoria offline, Silverlight, etc.). Because .NET provider for Firebird is pure C# and we have Mono compatible build, I deduced that it should work with iPhone too.

Sure, it’s a nice challenge to whole MonoTouch stack, because the .NET provider is more about the code than about the application itself. And we’re using there a lot of different things that can go wrong or may not be available or compilable to native code. And I have to say, the guys behind MonoTouch did a great work (I still can’t believe it).

With couple of minor tweaks I was able to create application that connects from iPhone (simulator) through internet to Firebird server. Pure C#, no hacking or major problems.


Application connecting to Firebird server and showing the server version.

First I’m impressed how mature the MonoTouch is. Second I’m still trying think thru all the possibilities you have with this. With some work on UI you can deliver the same database oriented application to Windows Mobile and iPhone using the same business layer (sure some webservice approach would be better, but …).

12 thoughts on “Connecting from iPhone to Firebird

  1. Pingback: Firebird News » Connecting from iPhone to Firebird

  2. william

    hi,

    this is very interesting. since im not a geek, mind explaining how this can work so I can try it for myself?

  3. Simon

    Hi, thank you for this info, but I am wondering … does “.NET provider for Firebird” need fbclient.dll library, or how all this works?

  4. cincura.net Post author

    No it doesn’t. The Firebird wire protocol is completely implemented using managed code (C#). That’s BTW why you can run it on MonoTouch (as proved here).

  5. jim story

    i’ve purchased latest version of mono touch and cannot get it to compile. have you tried this with their latest versions?

    I’ve tried searching and you appear to be the only one out there trying to do what we need to do.

  6. cincura.net Post author

    You’ll not be able to compile it out of the box. I’ve done some changes (removing some parts) in code to make it work.

  7. jim story

    i download .net provider from svn last night and finally got it to compile without errors. it runs on iphone simulator but FbConnection will not open a connection to the firebird server. i’ve got a firebird server running on my mac and tried connecting to a remote server via internet. both servers are versions 2.1 and i’m using .net provider 2.5 from svn.

    it doesn’t throw an exception. connection string is correct, and the server is valid.

    your original post mentions some “minor tweaks”. could you share those?

    thanks.

  8. cincura.net Post author

    I don’t remember details. I changed stuff incrementally.

    Anyway are sure it is worth doing it? Some webservice approach is probably much better way to deal with data from Firebird into device.

  9. Pingback: Firebird News » #Monodroid :Connecting from Android to Firebird with .NET provider for #Mono

  10. Joost

    Very interesting! Would love to try this sometime soon (if I find some spare time), maybe I’ll try to get this to work over an SSH connection for security reasons.

    Nice work.

Leave a Reply