I am trying to make a login page with xamarin
public bool Login(string Username, string Password)
{
Users _user = new Users();
string mySelectQuery = "SELECT Name, Password FROM Users WHERE Name='" + Username + "' AND Password='" + Password + "'";
var user = new SQLiteCommand(mySelectQuery);
if (user != null)
{
return true;
}
return false;
}
At SQLiteCommand part it gives an error. The error is CS1729 Does not contain a constructor that takes 1 arguments I checked out on the internet but I didn't get it I am new at this.
You use SQLiteCommand class, and contain one arguments, it should be SQLiteConnection, here is sample that about this: