facebook

SQL –

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #350976 Reply

    Robert Gardner
    Participant

    I’ve parsed the posts several times. Although some seem similar I’m not sure I’ve seen something specific to my needs…. So, at the risk of duplication I’ll ask my specific question.

    I have an external SQL database that I want to connect to for “READ ONLY” purposes (no need to update rows). Simply want to provide key for query and return resultant row(s) to my MobiApp for display.

    If for example my date was as simple as a demographic table containing rows with each row having Name, Address, City, State,Zip, How would I connect to the database from Mobi?

    Has anyone been successful connecting to a SQL database for read only purposes? If so could you share the code with me?

    Thanks in advance..

    #351003 Reply

    Code_A
    Member

    I have a few apps that connect to a server side database so I can assure you that it can be done.

    The first thing you need (besides the database on the server) is to create a RESTful web service (I use PHP). This is the code that handles the requests from your app, accesses the database, and then sends the info back using REST. Once you have setup the we service, you can call the web service and handle the data received through AJAX within MobiOne.

    The code I use to call the web service can be found in the following post: viewtopic.php?f=8&t=7476. Hope this helps get you started.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: SQL –

You must be logged in to post in the forum log in