mercredi 9 mars 2016

How to check if sqlite db connection is open or not?

I want to check whether sqlite db connection has been already open or not.

I'm using cordova-sqlite-storage and comparing with null did not work.

if (db !== null) { // doesn't work
  b.transaction(function(tx) {
    //do something
  }
}

Is there any way to do it?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire