Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ionic 3 complains that database is already open

$
0
0

@vivekh wrote:

I’m using cordova-sqlcipher-adapter along with ionic-native/sqlite to carry out local DB operations. I’m using create method to open database every time I need to run executeSql for a DB operation. This makes Ionic 3 display the following message:

database already open: data.db

In another earlier topic on this forum, the user was using openDatabase() method to open the DB and hold a reference to the opened DB and carry out operations on the reference subsequently. However, it looks like openDatabase() method is not present as per ionic-native/sqlite documentation.

My question is, is it necessary to execute .create() every time I need to run .executeSql()? Is there a way to open the database ONCE and carry out operations on it at any time while the app is running?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>