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

Sqlite Problem

7 Answers 113 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Keen
Top achievements
Rank 1
Keen asked on 06 Jun 2013, 01:12 AM
Hi everyone
     I'm using SQLite database to store the response of SOAP XML,using ajax I succefully get and inserted the data to SQLite, but what I noticed is there are some data that is not inserted correctly in SQLite .
I got this Error :
"Error: could not execute statement (19 constraint failed) "
please Help..

and also I attached a image that dealing with cannot recognize the SQLite plugin even my path is correct.

7 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 06 Jun 2013, 07:28 AM
Hello Keen,

Cordova plugins are not supported in the simulator, this information is available in the Add and Configure Plugins help article. So when you're in the simulator, the built-in WebSql is used instead and the console log message you get is correct.
About the exception - constraint failed usually indicates that you did something like pass a null value into a column that you declare as not null when you create your table. If this is not it, you can use the suggestion from this forum to identify the problematic constraint.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Keen
Top achievements
Rank 1
answered on 06 Jun 2013, 08:11 AM
Hello Steve,

So regarding with the simulator, it will not run. but on real device it will successfully run ?


0
Steve
Telerik team
answered on 06 Jun 2013, 08:52 AM
Hello Keen,

Whenever you're in the simulator, you can fall back to the built-in Web SQL, this is already happening for you i.e. that is what the "Use built in SQL Lite" log entry means. When you deploy your app on real device the check if(window.sqlitePlugin !== undefined) would return true, so the SQLite plug-in would be used instead.

You can find more information about the SQLite plug-in from our blog post: Adding Dynamic Data with the SQLite Plugin.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Keen
Top achievements
Rank 1
answered on 06 Jun 2013, 09:42 AM
Ok Steve. I really get it.. :)
Thanks for the help. :)
0
Arthanari
Top achievements
Rank 1
answered on 15 Jun 2013, 06:06 AM
HI,
    
     For me, sqlite working on simulator for apple ipad, bt not in device, Im stuck with this problem, pls suggest me solution for this


Thanks and Regards,
Arthanari
0
Keen
Top achievements
Rank 1
answered on 17 Jun 2013, 12:13 AM
Hi Arthanari,

   The sample SQLite of Icenium really works on device. :) And I tried that codes to my samples apps and its working.
0
Arthanari
Top achievements
Rank 1
answered on 17 Jun 2013, 05:19 AM
hi Keen,

                  sample project works, but using sample project i have done a project, its not working, i think jquery1.9 interupted this...

Thanks
Arthanari
Tags
AppBuilder Windows client
Asked by
Keen
Top achievements
Rank 1
Answers by
Steve
Telerik team
Keen
Top achievements
Rank 1
Arthanari
Top achievements
Rank 1
Share this question
or