Sqlite Problem

8 posts, 0 answers
  1. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 05 Jun 2013 Link to this post

    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.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 06 Jun 2013 Link to this post

    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.
  3. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 06 Jun 2013 Link to this post

    Hello Steve,

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


  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 06 Jun 2013 Link to this post

    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.
  5. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 06 Jun 2013 Link to this post

    Ok Steve. I really get it.. :)
    Thanks for the help. :)
  6. Arthanari
    Arthanari avatar
    11 posts
    Member since:
    Apr 2013

    Posted 15 Jun 2013 Link to this post

    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
  7. Keen
    Keen avatar
    101 posts
    Member since:
    Mar 2013

    Posted 16 Jun 2013 Link to this post

    Hi Arthanari,

       The sample SQLite of Icenium really works on device. :) And I tried that codes to my samples apps and its working.
  8. Arthanari
    Arthanari avatar
    11 posts
    Member since:
    Apr 2013

    Posted 17 Jun 2013 Link to this post

    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
Back to Top