-
Notifications
You must be signed in to change notification settings - Fork 48
Can't open database #28
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Did you add the file to the project and make sure that it's being copied to your app in development? |
I added the file to the project and I didnt quite understand what you meant by "make sure that it's being copied to your app in development". All I did is put the file in the folder like the example. Since no more instructions were given I thought that was it. Is there something more I should do? |
You shouldn't need to create the files via the terminal. The .sqllite file gets auto-created in the app documents directory if it doesn't exist already. And you can run the sql commands via javascript (to create a table, insert data, etc). It should work. It does for me. |
No files are created for me. What is the relative path to the documents folder? |
You should create a folder in your XCode named Documents and put the sqlite file there. |
@ermannos Can you explain how to do clearly? I have a problem with database like this. But i've tried to do like you said. But it's not work. Thank you. |
Please don't use this library! It's been surpassed by other more recent libraries such as https://github.com/andpor/react-native-sqlite-storage |
So I created an .sql and .sqlite file through the Terminal.
I created the same table and inserted one row. To see if I could read from it.
I placed the files in the same place as in the react-native-sqlite-example and both of them don't work.
The error message while selecting all rows (select * from table;) basically returns the error message:
No such table: teste (teste is my table btw)
So I see someone here got a similar error. No file is created either. I would love to have this working.
The text was updated successfully, but these errors were encountered: