locked
How to perform raw SQLite query (With multiple row result) through sqlite3-winrt

    Question

  • Hi,

         In Java, to obtain multiple row result data, I would perform

    Cursor cursor = database.rawQuery(sql, null);
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        // For every cursor, obtain its col data by 
        // cursor.getLong(0), cursor.getInt(1), ...
        cursor.moveToNext();
    }

    how to do this using sqlite3-winrt database in windows store apps javscript

    Wednesday, April 09, 2014 4:23 AM

Answers

  • For help with the SQLite-winrt wrapper you'll be better off posting on the project site at http://sqlwinrt.codeplex.com/discussions

    Tim Heuer has a JavaScript code snippet showing how to set up and query a SQLite database in JavaScript at UPDATED HOWTO: SQLite with Windows 8 apps which obtains a multiple row result as follows:

    return db.eachAsync('SELECT * FROM Item', function (row) {
        console.log('Get a ' + row.name + ' for $' + row.price);
    });
    

    --Rob

    Wednesday, April 09, 2014 11:32 PM
    Owner