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

where is add sqlite db? #6

Closed
hamidish opened this issue Mar 13, 2022 · 9 comments
Closed

where is add sqlite db? #6

hamidish opened this issue Mar 13, 2022 · 9 comments

Comments

@hamidish
Copy link

hi
where is add db in maui?
in resources or in each paltfrom?

@VladislavAntonyuk
Copy link
Owner

VladislavAntonyuk commented Mar 13, 2022

_database = new SQLiteConnection(dbPath);

Hi, you set the path to database. The database is usually stored in the device storage.

@hamidish
Copy link
Author

hamidish commented Mar 13, 2022

_database = new SQLiteConnection(dbPath);

Hi, you set the path to database. The database is usually stored in the device storage.

means, I do not save in the project ؟

@hamidish
Copy link
Author

i got this error :
SQLite.SQLiteException
Message=no such table:

@hamidish
Copy link
Author

i go to project folder in obj in android folder paste my db to assets. its true?

@VladislavAntonyuk
Copy link
Owner

No, your database should be on your Android device

@VladislavAntonyuk
Copy link
Owner

_database = new SQLiteConnection(dbPath);

Hi, you set the path to database. The database is usually stored in the device storage.

means, I do not save in the project ؟

But you still have to read it. You have to pass correct path to db.

@VladislavAntonyuk
Copy link
Owner

Similar discussion: https://vladislavantonyuk.azurewebsites.net/articles/Adding-SQLite-to-the-.NET-MAUI-application#comment-5688469148

@hamidish
Copy link
Author

thx.
i used exitnig sqlite db.
but now i creattable from with code and now its worked

@VladislavAntonyuk
Copy link
Owner

@hamidish does the issue solved? can I close it?

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

No branches or pull requests

2 participants