Software Archive
Read-only legacy content

client SQL to control DB

paolo_c_
New Contributor I
276 Views

 

Hi,

I have an error in my app wher I read DB.

Can I controll my DB with some client SQL? I find my DB in android device?

This is un exctract of my code

var db = openDatabase('mydb1', '1.0', 'Test DB', 2 * 1024 * 1024);
        var sCombo;
        var sComboSet;
        var sComboGioca;
        var partitaId = gPartitaAperta;

        db.transaction(function (tx) {
            var sql = 'SELECT p.nome FROM partita p WHERE p.id = ' + partitaId;

etc.....

 

 

0 Kudos
3 Replies
Rakshith_K_Intel
Employee
276 Views

What is the error message you are seeing? and what android device/version are you using to test?

0 Kudos
paolo_c_
New Contributor I
276 Views

 

Android 4.4.2 but it is not important
Maybe I explained bad
I have errors due to data incorrectly inserted

I need a tool sql to access and control the data I recorded
I installed sql editor, but I do not know where to find my DB on the device

0 Kudos
PaulF_IntelCorp
Employee
276 Views

That's going to be tough. Did you use the SQLite plugin to implement your SQL database? If so, you can inspect that plugin's source code to determine the name and location of the DB file and maybe extract that file from a device using something like Astro. Or, you might have to modify your app to retrieve and mail the DB file from your device. In any event, if you believe you have put bad data in the DB and you have the app installed on many devices, you'll probably have to issue a new version of the app that, on first run, reads the bad DB, fixes it, and stores the fixes back...

0 Kudos
Reply