Alpha DevCon 2018
Results 1 to 2 of 2

Thread: PhoneGap Create and Download SQLiTE database

  1. #1
    VAR
    Real Name
    Andy Meer
    Join Date
    Mar 2005
    Location
    Atherstone UK
    Posts
    449

    Default PhoneGap Create and Download SQLiTE database

    Hi All

    Is anybody using the action javascript action to Create and Download a SQLITE database to a device?
    if so would you mind sharing?.

    I have been following the videos from Selwyn but cannot seem to get this to work; here is the code I am using in the onComplete in the action script

    Code:
    var _dbName = 'db2.db';
    var _sql = (function() { var sql = 'SELECT Category FROM Categorys'; 
    return sql;})();
    var _args = [];
    var _success = function(tx,result,resultArray) { {dialog.Object}.setListColumnsAndPopulate('List1',resultArray);};
    var _error = function(e) { };
    _onTxSuccess = function() {/*transaction success */  };
    _onTxError = function() {/*transaction error */  };
    {dialog.object}.SQLiteExecuteSQL(_dbName,_sql,_args,_success,_error,_onTxSuccess,_onTxError);
    I have no problems adding a SQLite db when I first publish the phonegap project.

    I have also added the phonegap Device / File / File Transfer plugins

    Andy help would be greatly appreciated

    Kind Regards for the New Year to all

    Andy

  2. #2
    Member jgrannis's Avatar
    Real Name
    Jeff Grannis
    Join Date
    Apr 2016
    Location
    New Iberia, LA
    Posts
    167

    Default Re: PhoneGap Create and Download SQLiTE database

    We have an app that creates about 30 tables in a SQLite database and downloads it (using the Action Javascript: Create SQLite Database on Server then download to Device).
    We then use Action Javascripts "Execute SQL statement(s)" all over the place. All works fairly well.

    Which SQLite plugin are you using? The Ext one?

Similar Threads

  1. PhoneGap Unable to Download App
    By MichaelCarroll in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 03-08-2018, 11:58 AM
  2. adding a link for download the APK file from PhoneGap
    By YigalAyalon in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 06-17-2017, 12:17 PM
  3. Problem Creating SQLite Database File
    By dmoss in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 06-10-2016, 03:36 PM
  4. PhoneGAP AJAX call to SQLite error...
    By mbunds in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 03-14-2016, 07:31 PM
  5. Offline mobile database support (IndexDB, SQLite, ...)
    By nlights in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 05-09-2014, 08:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •