Error with ExecuteSQL in Phonegap / Android
**Hello**,

I'm a french developper of mobile application. I have been using phonegap, to develop Android application, since 1 month.
In my application I use Database storage , and I have a problem with the executeSql method.

With my device (HTC Sensation) in Gingerbread (Android 2.3) this code is running correctly:
    
    var db;
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
	   createDB();
    }
    function createDB() {  
	    db = window.openDatabase("parking", "1.0", "DB Parking");
	    db.transaction(verifDB, dbEmpty,dbNotEmpty);
    }
    function verifDB(tx)
    {
	    try
	    {
		   tx.executeSql("SELECT * FROM ETABLISSEMENT", [], dbNotEmpty, dbEmpty);
	    }
	    catch(err)
	    {
		   alert(err);
	    }
	
     }
     function dbEmpty(tx)
     {
           db.transaction(populateDB, errorCB, successCB);
     }
     function dbNotEmpty()
     {
          //Do nothing
     } 



But yesterday I've upgraded my device in Ice Cream Sandwich (ICS) and today my application is crashing at the line: 

    tx.executeSql("SELECT * FROM ETABLISSEMENT", [], dbNotEmpty, dbEmpty);

I looked in LogCat tab in Eclipse and I have seen this:

> 02-15 11:00:51.843: E/AndroidRuntime(8030): FATAL EXCEPTION: main

> 02-15 11:00:51.843: E/AndroidRuntime(8030): java.lang.NullPointerException

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.Storage.executeSql(Storage.java:168)

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.Storage.execute(Storage.java:87)

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.api.PluginManager.exec(PluginManager.java:176)


I have tried with Phonegap **1.3.0** and **1.4.1** , I use phonegap.jar and phonegap.js who are in Android folder in Phonegap archive.

I hope someone have a solution.

**Thank you for reading.**


ps: please let me know if you find mistakes in my text thank you.
Error with ExecuteSQL in Phonegap / Android
===

**Hello**,

I'm a french developper of mobile application. I have been using phonegap, to develop Android application, since 1 month.
In my application I use Database storage , and I have a problem with the executeSql method.

With my device (HTC Sensation) in Gingerbread (Android 2.3) this code is running correctly:
    
    var db;
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
	   createDB();
    }
    function createDB() {  
	    db = window.openDatabase("parking", "1.0", "DB Parking");
	    db.transaction(verifDB, dbEmpty,dbNotEmpty);
    }
    function verifDB(tx)
    {
	    try
	    {
		   tx.executeSql("SELECT * FROM ETABLISSEMENT", [], dbNotEmpty, dbEmpty);
	    }
	    catch(err)
	    {
		   alert(err);
	    }
	
     }
     function dbEmpty(tx)
     {
           db.transaction(populateDB, errorCB, successCB);
     }
     function dbNotEmpty()
     {
          //Do nothing
     } 



But yesterday I've upgraded my device in Ice Cream Sandwich (ICS) and today my application is crashing at the line: 

    tx.executeSql("SELECT * FROM ETABLISSEMENT", [], dbNotEmpty, dbEmpty);

I looked in LogCat tab in Eclipse and I have seen this:

> 02-15 11:00:51.843: E/AndroidRuntime(8030): FATAL EXCEPTION: main

> 02-15 11:00:51.843: E/AndroidRuntime(8030): java.lang.NullPointerException

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.Storage.executeSql(Storage.java:168)

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.Storage.execute(Storage.java:87)

> 02-15 11:00:51.843: E/AndroidRuntime(8030): 	at com.phonegap.api.PluginManager.exec(PluginManager.java:176)


I have tried with Phonegap **1.3.0** and **1.4.1** , I use phonegap.jar and phonegap.js who are in Android folder in Phonegap archive.

I hope someone have a solution.

**Thank you for reading.**


ps: please let me know if you find mistakes in my text thank you.