How to create connectivity to sql database in icenium?

14 posts, 0 answers
  1. badal
    badal avatar
    4 posts
    Member since:
    May 2013

    Posted 14 May 2013 Link to this post

    How to create connectivity to sql database in icenium?
  2. David Silveria
    David Silveria avatar
    234 posts
    Member since:
    May 2006

    Posted 14 May 2013 Link to this post

    Icenium is environment for creating hybrid apps that run on mobile devices and as such, offline mode should be taken into account. Using a designated DB server would always require your app (respectively the user's device) to have connectivity available. With that said, a good starting point on storing data in HTML application is this page. Icenium supports the SQLite Cordova plugin. You can use it to create, update and query a native sqlite database that is stored on the device's filesystem and is permanent until you delete it or the user uninstalls your app.

    If you MUST use a designated DB server, you can check this nice introduction to WebAPI, REST, JSON, AJAX with SQL as datasource here.
  3. Filip
    Filip avatar
    35 posts
    Member since:
    Jul 2013

    Posted 07 Jul 2013 Link to this post

    Hello, what do you suggest to use if I want to connect to remote database?

    I am building an app where data is stored on a remote server, and I want to do occasional check-outs to my local database.
    For example:
    1) on login, we access remote database for user management information (user exists?, password valid?...)
    2) after authentication, remote data is downloaded and then accessed locally
    3) local changes are propagated to the remote database as well

    Some hints and starting points on the topic would be very welcome. Thanks.
  4. Nick
    Nick avatar
    2 posts
    Member since:
    Jul 2011

    Posted 17 Jul 2013 Link to this post

    Hello,

    I have exactly the same requirements as you have described Filip, so I would be very interested in getting an idea on how to implement this.

    Thanks,
    Nick.
  5. N/A N/A
    N/A N/A avatar
    1 posts
    Member since:
    May 2005

    Posted 21 Aug 2013 Link to this post

    same requirements ,
    please any idea.

    Thanks,
  6. Ivan
    Admin
    Ivan avatar
    111 posts

    Posted 21 Aug 2013 Link to this post

    Hi,

     There are two scenarios you may be having. First one is having an existing database with some data. It is hosted on a remote server of yours. If that is the case then you need to expose that data (in the database) through some kind of service (REST, Soap or some other type). Your mobile app will query that service when you need to. In this case you have to provide and support the remote service, database and server infrastructure (servers) availability.  

    If you want 'out of the box' solution you might consider using Everlive. Everlive offers a no-SQL database with its own JavaScript API, and since it is a cloud based backend service, it relieves you from the burden to maintain your own database server. You can read more about the build-in integration in Icenium with Everlive here: 'Working with Icenium Everlive'.

    The default Everlive project template in Icenium is actually a mini-sample demonstrating how to use the Everlive JavaScript API. It supports user account registration and authentication and shows how to perform basic CRUD operations.

    Regards,
    Ivan
    Telerik

    Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  7. Victor
    Victor avatar
    1 posts
    Member since:
    Oct 2013

    Posted 16 Oct 2013 Link to this post

    The best shortcut to access database via a REST API is SlashDB. I should know because I work on this project ;) <Site removed by admin. Do not post links to external product sites>
  8. Dave C
    Dave C avatar
    2 posts
    Member since:
    Feb 2011

    Posted 31 Jan 2014 in reply to Ivan Link to this post

    Ivan,

    If I were to use Everlive as you suggested, how would I copy the data captured in Everlive over to my SQL Server for the sake of querying, reporting, etc..??  Does Everlive suppport such a feature?

    Thanks.
  9. Nick
    Nick avatar
    7 posts
    Member since:
    May 2012

    Posted 03 Feb 2014 Link to this post

    We successfully use asp.net webservices to connect to a mysql database. Our services handle both file uploads, authentication, data retrieval, image thumbnail creation etc and work very well, any responses are returned as JSON arrays.

    The same could be handled by a suitable PHP script. 
  10. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 03 Feb 2014 Link to this post

    We use WebAPI and WCF Rest services to expose our data to mobile apps via JSON/ORM/SQL Server.

    It's Ajax calls on the client, works fine. 

    You wouldn't want to be exposing your SQL server directly to the web, it's a huge security risk.
  11. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 29 Oct 2014 Link to this post

    N Mackay

    May I request to have your code on connecting to Web Api and hwo to get data via ajax json file..

    Thanks you. I will work on that kind of project


    Regards
    Keen
  12. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 30 Oct 2014 in reply to Keen Link to this post

    Hi Keen,

    That code is a production app and secure data service so I'd be in breech of my contract to post it online.


  13. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 30 Oct 2014 Link to this post

    N MAcky

    Sorry for asking that question. Is there a article ,some link that helps u with that?
    So I can Follow their step..


    Regards

    Keen
  14. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 31 Oct 2014 Link to this post

    Hi Keen,

    The approach that you should take depends on your own scenario. Is your data already on a remote server? If so, you can expose it using a web service of your choice. There are various tutorials on the internet on using Web API, WCF, etc.

    If you want to keep your data locally, I'd advise you to try the SQLite plugin in AppBuilder.

    If you want your data online but don't have a dedicated server for it, try out Telerik Backend Services (previously named Everlive).

    Regards,
    Tsvetina
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top