I have a query that i test against sqlite directly and works fine, but when using it in windows phone 8 app doesn't return a result
string sqlCommandText = "select a.article_id article_id, a.book_hierarchy_id book_hierarchy_id, b.title title , b._ID _ID , b.articles_count articles_count, b.saved_articles_count saved_articles_count, b.hierarchy_id hierarchy_id, b.downloaded_articles_count downloaded_articles_count " +
"from hierarchy_articles a inner join book_hierarchy b on b.book_hierarchy_id = a.book_hierarchy_id " +
"where a.book_id = " + bookID + " and a.book_hierarchy_id > " + Consts.HadithKotobsCount + " order by a.article_id";
using (SQLiteConnection conn = new SQLite.SQLiteConnection(Consts.DBPath))
{
SQLiteCommand sqlCommand = new SQLiteCommand(conn);
sqlCommand.CommandText = sqlCommandText;
List<HadithIndexTemp> babs2 = sqlCommand.ExecuteQuery<HadithIndexTemp>();
}
and here the mapping type
public class HadithIndexTemp
{
public int article_id { get; set; }
public int book_hierarchy_id { get; set; }
public string title { get; set; }
public int _ID { get; set; }
public int articles_count { get; set; }
public int saved_articles_count { get; set; }
public int hierarchy_id { get; set; }
public int downloaded_articles_count { get; set; }
}
 
Aucun commentaire:
Enregistrer un commentaire