How fetch result from query

Topics: Windows Phone
Dec 23, 2014 at 8:14 AM
How do i fetch the query result so that i can put in an object?
Jan 2, 2015 at 3:16 PM
Hi @faysal515

Assuming you have a initiated a connection and assigned a SQL Query on command variable, you can do something like the following:
using (var statement = connection.Prepare(command))
    while (statement.Step() == SQLiteResult.ROW)
        var id = (long)statement[0];
        var i = (long)statement[1];
        var t = (string)statement[2];
        var r = (double)statement[3];

        queriedRecords.Add(new Tuple<int, long, string, double>((int)id, i, t, r));
Marked as answer by marianosz on 1/2/2015 at 8:16 AM