Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such table (Ionic 2 framework) #53

Open
michaeljcoyne opened this issue Jan 24, 2017 · 4 comments
Open

No such table (Ionic 2 framework) #53

michaeljcoyne opened this issue Jan 24, 2017 · 4 comments

Comments

@michaeljcoyne
Copy link

michaeljcoyne commented Jan 24, 2017

This is my code.

this.database = new SQLite();  
this.database.openDatabase({name: "database.sqlite", location: "default", createFromLocation: 1})

If I change the name of the database the console says the database is opened even though it doesn't exist.

@iursevla
Copy link

I think that is expected behaviour. If there's no database it tries to create a new one, so after creation it exists.

@brodycj
Copy link
Owner

brodycj commented Jan 25, 2017

Thanks @iursevla, that is correct. Is this not clear from the documentation?

@michaeljcoyne
Copy link
Author

michaeljcoyne commented Jan 25, 2017

Yes but how can I open the actual database and tell it has opened it? Because it is saying the table doesn't exist, when the console says the database I specified (residing in the www) has been opened ok. (I am using ionic 2)

@brodycj
Copy link
Owner

brodycj commented Jan 27, 2017

When you open the database you can check the sqlite_master table. It will show you which tables are in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants