Hi Nic, Your code led me to the solution for my problem.
On 23 May 2012 13:48, Nic Wise <[email protected]> wrote: > Very odd. Incase I messed up, here's the _exact_ code I use > > private class DoubleObj > { > public double AmountSum { get; set; } > } > > try > { > var inc = conn.Query<DoubleObj>("select sum(Amount) as > AmountSum from \"Transaction\" where > Direction = ? and TransactionDate > between ? and ?", > (int)TransactionDirection.Income, > taxSettings.StartDate, > taxSettings.EndDate).FirstOrDefault(); > income += inc.AmountSum; > } catch (Exception ex) { > Util.LogException(ex); > income += 0; > } Note: Could it be that 'income += inc.AmountSum;' should really be 'income += inc[0].AmountSum;'? I did not have the ' as ' part in my sql statement. So there was no way of mapping the result set to the List<class> variable. And - obviously - the name of the returned value better match the public variable in the <class>, and it is not really adviseable to use keywords like 'Count' as name for said public variable ;P Thanks for your help, and have a nice day. With kind regards, Guido -- Every little picofarad has a nanohenry all its own. -- Don Vonada http://vanhoecke.org ... and go2 places! _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
