I developed the Xamarin android app. I also created an Sqlite database using Sqlite browser. After that, I inserted my existing data. My database has 5 tables. Now I want to connect to it via my Xamarin Android app. How can I do this? Please help.
Asked
Active
Viewed 947 times
1 Answers
0
You find a nice tutorial to use the SQLite database in your Xamarin.Android project here
Alternatively you can use the SQLite.Net library to connect with the database, you can find the detailed documentation here

Prashant Cholachagudda
- 13,012
- 23
- 97
- 162
-
Actually i want to SQLite database connect Xamarin app. And also want to database handle for using Sqlite browser. But where my database create? What location store my database? I can't find it. – Sampath Mar 29 '17 at 13:39
-
string dbPath = Path.Combine ( Environment.GetFolderPath (Environment.SpecialFolder.Personal), "ormdemo.db3"); This is database path. But how can i find this location. Where store "ormdemo.db3" database. I can't find it.Please help me. – Sampath Mar 29 '17 at 13:41
-
I can manually create "example.db3" using sqlite browser. Then how can pack it my xamarin app. What is the connection string. – Sampath Mar 29 '17 at 13:43
-
@Sampath You can have to add it as an asset under Resources/Assets folder, when the runs for the first time copy it over to `Environment.SpecialFolder.Personal` path – Prashant Cholachagudda Mar 29 '17 at 14:13
-
please give me a sample code or link. I try it. But does not working. My existing database firstly copy Assest folder. After set the path. But not solved problem. Give me a some advice. – Sampath Mar 30 '17 at 13:01
-
Hi @Sampath, maybe this link can help you as it includes a complete code example along with detailed explanation: https://www.codeproject.com/Tips/837061/Xamarin-plus-SQlite-plus-Android – Mamta D Apr 03 '17 at 09:14