Databases and Adobe AIR

Discussion in 'Web Design and Development' started by geekindisguise, Oct 19, 2009.

  1. geekindisguise macrumors 6502

    geekindisguise

    Joined:
    Jul 22, 2008
    Location:
    Oklahoma
    #1
    How do I go about connecting a Database to my Adobe AIR application?
    The Database is on my webserver now. And I can connect to it from the regular web page, but I don't know how to connect to the same database from the AIR application.
    Is Adobe AIR even able to work with PHP?

    Thanks. :)
     
  2. Ride9650 macrumors 6502

    Joined:
    Jun 29, 2007
    #2
    Of course you can use databases with AIR apps!
    I know this because I use an AIR app called Lita to examine SQLite databases.

    I've never tried to integrate databases into my work, but after a little research, it looks like only SQLite is useable, I'm not sure about MySql which is what I assume you have, you'll have to look a little deeper about that.

    One tutorial I found

    http://www.peterelst.com/blog/2008/04/07/introduction-to-sqlite-in-adobe-air/

    If that doesn't work out, I know Actionscript can work with PHP
    One tutorial is here
    http://gotoandlearn.com/play?id=90
     
  3. geekindisguise thread starter macrumors 6502

    geekindisguise

    Joined:
    Jul 22, 2008
    Location:
    Oklahoma
    #3
    Is this all with External Databases? Because I know how to make the database for that application locally.

    But I want to connect to a Database that is updated a lot on my web server.
     
  4. Ride9650 macrumors 6502

    Joined:
    Jun 29, 2007
    #4
    ? If you already know how to connect to a database locally, then why did you ask your question in the first place?

    You'd connect in the exactly the same way you connect to your local database, except, instead of having it connect to something like "localhost" you'd set that parameter to connect to '55.33.10" or whatever address your webserver is. You'd have to include the parameters like username or password too if those are set for that particular database.

    As to working with PHP,
    I had assumed you understood that Actionscript is often times, an essential component in making AIR apps, which is why I pointed out the tutorial on using PHP with actionscript. Do you not have any actionscript in your AIR app?

    It'd be helpful for you to explain how you're connecting locally, what technology you're using(MySql,SQlite), etc.
     
  5. geekindisguise thread starter macrumors 6502

    geekindisguise

    Joined:
    Jul 22, 2008
    Location:
    Oklahoma
    #5
    Its really that simple? I thought you had to do more than that. Can I put my domain instead of the IP? Because I have a dynamic IP, and my domain gets updated automatically.

    I am using Mysql.
     
  6. Ride9650 macrumors 6502

    Joined:
    Jun 29, 2007
    #6
    Well, yes, it really is that simple.

    You could try using your domain but since thats simply masking an IP anyways, it may or may not work.

    If you're using MySql, you'll have to do a little more research, as I have no clue if MySql will work with Air apps, all the things I came across referred to SQLite.

    maybe someone else will come along that knows the answer.
     
  7. twoodcc macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #7
    let us know if you get it to work with your domain
     

Share This Page