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

Pre populated database for distribution

1 Answer 64 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.
Nick
Top achievements
Rank 1
Nick asked on 01 Mar 2013, 11:33 AM
How do I add a pre-populated database when deploying an App??
I am currently creating and populating it on the live app (importing data with Ajax then creating DB, then Tables, then populating the tables) but this is inconvenient for the user and I am having problems getting the code to work correctly (yes the asynchronousproblem!) and I need a solution for now.
Nick

1 Answer, 1 is accepted

Sort by
0
Kristian D. Dimitrov
Telerik team
answered on 06 Mar 2013, 02:45 PM
Hello Nick,

We found this blog post describing a solution for a similar problem here. This solution is for Android due to "file:///android_asset/www/create.sql", but it should work fine for iOS as well, just with different path.

You can get the path to the file by getting the window.location.href and replacing the "index.html" with the name of the file of your database. Also if you use Kendo UI remove the window.location.hash from the route, because it is used to navigate the views.


All the best,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
General Discussion
Asked by
Nick
Top achievements
Rank 1
Answers by
Kristian D. Dimitrov
Telerik team
Share this question
or