Reputation: 478
Im working on visual studio 2015 with Xamarin and SQLite and i was trying to get values from my database so i could save them in variables in my code how can i do this?
My Code:
string folder = "/sdcard/Pictures/";
var db = new SQLiteConnection(System.IO.Path.Combine(folder, "GameHubDB.db"));
db.CreateCommand("SELECT Id FROM [Note] WHERE Username = '" + UsernameTxt.Text + "' AND Password='" + PasswordTxt.Text + "'", Id);
db.Commit();
Upvotes: 1
Views: 476
Reputation: 2761
You can use a nuget package to create the SQLite connection. Refer this link https://developer.xamarin.com/recipes/android/data/databases/sqlite/
Upvotes: 1