This is a migrated thread and some comments may be shown as answers.

How to create connectivity to sql database in icenium?

13 Answers 740 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
badal
Top achievements
Rank 1
badal asked on 14 May 2013, 12:13 PM
How to create connectivity to sql database in icenium?

13 Answers, 1 is accepted

Sort by
0
David Silveria
Top achievements
Rank 1
answered on 14 May 2013, 01:43 PM
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.
0
Filip
Top achievements
Rank 1
answered on 07 Jul 2013, 08:19 PM
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.
0
Nick
Top achievements
Rank 1
answered on 17 Jul 2013, 10:22 AM
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.
0
N/A N/A
Top achievements
Rank 1
answered on 21 Aug 2013, 01:13 PM
same requirements ,
please any idea.

Thanks,
0
Ivan
Telerik team
answered on 21 Aug 2013, 03:42 PM
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.
0
Victor
Top achievements
Rank 1
answered on 16 Oct 2013, 10:14 PM
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>
0
David
Top achievements
Rank 1
answered on 31 Jan 2014, 11:12 PM
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.
0
Nick
Top achievements
Rank 1
answered on 03 Feb 2014, 10:08 AM
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. 
0
N Mackay
Top achievements
Rank 1
answered on 03 Feb 2014, 11:19 AM
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.
0
Keen
Top achievements
Rank 1
answered on 29 Oct 2014, 09:32 AM
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
0
N Mackay
Top achievements
Rank 1
answered on 30 Oct 2014, 10:15 AM
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.


0
Keen
Top achievements
Rank 1
answered on 31 Oct 2014, 01:18 AM
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
0
Tsvetina
Telerik team
answered on 31 Oct 2014, 08:08 AM
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.

 
Tags
General Discussion
Asked by
badal
Top achievements
Rank 1
Answers by
David Silveria
Top achievements
Rank 1
Filip
Top achievements
Rank 1
Nick
Top achievements
Rank 1
N/A N/A
Top achievements
Rank 1
Ivan
Telerik team
Victor
Top achievements
Rank 1
David
Top achievements
Rank 1
Nick
Top achievements
Rank 1
N Mackay
Top achievements
Rank 1
Keen
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or