@barreola wrote:
I’m working with SQLite, but when I try to open a page, the next error is shown.
But the database is actually open
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private lookandfeel: LookandfeelProvider, public db: DatabaseProvider, public storage: Storage) { this.lookandfeel.getActiveTheme().subscribe(val => this.selectedTheme = val); platform.ready().then(() => { splashScreen.hide(); statusBar.styleLightContent(); this.db.openDb() .then(() => this.db.createTable()) .then(() => this.db.createTableProfile()) }); }
Above is the code when I open the database once the platform is ready.
I saw that only the first sentence appears to work thethis.db.createTable()
but the next one is just ignored I guess. This is my method.public createTableProfile() { return this.db.executeSql("CREATE TABLE IF NOT EXISTS profile(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, lastname TEXT, phoneNumber INTEGER, address TEXT)", {}); }
Why it keeps saying thats name is undefined?
Posts: 1
Participants: 1