I am getting the following error: "Parameter count mismatch" while inserting the record to my database. I have debugged line by line , data is coming perfectly but is not inserting in the database. Following is my code:
con = new SQLiteConnection(DatabasePath);
var rows = from c in con.Table<City>()
select c;
int count = rows.Count();
try
{
if (count > 0)
{
using (var dbConn = new SQLiteConnection(DatabasePath))
{
dbConn.RunInTransaction(() =>
{
dbConn.Insert(cities_list);
});
}
}
}
catch (Exception ex)
{
}
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire