❔ SQLite with Muai ensure connectionstring to DB for all devices
Im running SQLite db and i want the connection to the DB to point to the same file no matter if i runt it as android emulator or windows application. Right now the path changes and it just uses a new database with empty data. How can i Create a DB file and then ensure that all points to the same directory and file?
4 Replies
Have you checked out the documentation?
https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/database-sqlite?view=net-maui-7.0
Additionally, assuming me you mean Android and Windows platforms, you should absolutely NOT connect directly to the database from an app. Basically, it's a huge security risk. Instead use a webservice layer to broker communication between the application and the database.
More info on it: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/web-services/rest
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.@plam you are talking about a 3layer AppDesign right ?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.