Comments (10)
Can you paste the log from Xcode? or do this in error function console -
console.log("error in copy db", error)
from cordova-plugin-dbcopy.
INSTALL SUCCESS
LAUNCH SUCCESS
0 178269 log error in copy db, DB Already Exists
1 178271 log Error in Error callbackId: sqlDB368979961 : Error: Database location or iosDatabaseLocation setting is now mandatory in openDatabase call.
JS changed: www/js/app.js
JS changed: www/js/app.js
0 182186 log error in copy db, DB Already Exists
i am using ionic run command.
from cordova-plugin-dbcopy.
Hi, Problem is in line
db = $cordovaSQLite.openDB("demo.db");
thanks for quick reply
from cordova-plugin-dbcopy.
Like the error says you have to pass databaselocation or iOSDatabaseLocation paramter while opening the db. For. e.g
$cordovaSQLite.openDB({name : 'demo.db.sqlite',location : 'default'});
location depends on where you copied the db.
from cordova-plugin-dbcopy.
Hi,
i am not getting any tables from the data base, where am i doing wrong ?
` window.plugins.sqlDB.copy("demo.db",0,function() {
console.log("db read")
db = $cordovaSQLite.openDB({name : 'demo.db',location : 'default'});
}, function(error) {
console.log("error in copy db",error.message)
db = $cordovaSQLite.openDB({name: "demo.db",location: 'default'})
})`
and in controller
` $scope.showTables = function(){
console.log("show table")
$cordovaSQLite.execute(db,"SELECT name FROM sqlite_temp_master WHERE type=?",['table']).then(function(res){
console.log("tables"+res.rows.length)
}),function(err){
console.log('error in reading tables'+err)
}
}
})`
in assests folder the db is copying and have the tables
from cordova-plugin-dbcopy.
Remove the old db and recopy it. I think there might something wrong with the database or query. Use this to check sqlite database - http://sqlitebrowser.org/
from cordova-plugin-dbcopy.
it is showing file.
for reading the data i am using this, it's also giving me nothing
$scope.loadDb = function(){
console.log("values reading from db");
$scope.val = [];
$cordovaSQLite.execute(db, "SELECT * FROM example").then(function(res) {
console.log(res.rows.length);
for (var i = 0; i < res.rows.length; i++) {
$scope.val.push(res.rows.item(i).firstname)
//console.log('added' + res.rows.item(i).firstname)
}
}),function(err){
console.log('error'+err.message)
}
// })
}
from cordova-plugin-dbcopy.
Have you deleted the old app and installed new app? Also what is the error message in $cordovaSQLite.execute function?
from cordova-plugin-dbcopy.
i uninstalled and run the emulator.
now it is working.
Thankyou so much for your quick replys..
btw what is the problem ?
from cordova-plugin-dbcopy.
It might be database location problem which was copied somewhere else. Sqlite Plugin would have created a new blank database.
from cordova-plugin-dbcopy.
Related Issues (20)
- copyDbFromStorage: DB Not Present in www folder HOT 2
- Copy from a different folder HOT 3
- Issue with Android copyDbFromStorage HOT 3
- Issue when building Android for ionic HOT 2
- copyDbFromStorage seems to fail for Android 9 HOT 4
- I can't insert or update after copied HOT 1
- Build error in v 2.1.0 HOT 4
- Phonegap build failed with latest version (2.1.1) HOT 8
- copying on a usb storage HOT 1
- copyDbFromStorage copy Db to wrong path in Android 9 HOT 4
- customize output file name HOT 1
- What's error code: 400? HOT 2
- Issue on Android 9 *AFTER* succesfull copy on device HOT 1
- Playstore shows crashed Apps
- Ionic 4 problem copy database.db HOT 3
- Error during installation of plugin HOT 1
- error during plugin installation
- copy to device storage
- showing database already exists HOT 1
- Does sqliteDbCopy run on Capacitor? error:400 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-dbcopy.