I’m trying to open a database that i create with my table and my data inside but i cant make it work. I need help. I use this, but is not worlking.
Expo.FileSystem.downloadAsync(
Expo.Asset.fromModule(require('../assets/db/AppGYM.db')).uri,
`${Expo.FileSystem.documentDirectory}SQLite/AppGYM.db`
);
let db = SQLite.openDatabase('AppGYM.db');
db.transaction(function (tx) {
tx.executeSql('SELECT * FROM `Ejercicios`', [], function (tx, res) {
for (let i = 0; i < res.rows.length; ++i) {
console.log('item:', res.rows.item(i));
}
});
});