Ruslan, If i do cursorRef=valSQLSelect( dbRef_xdb, "SELECT SUM(roop) FROM x"); this works if the field "roop" is type Double, but not if I make the field type ULong. Does the SUM function work on Ulong fields? Best Regards, Steven Send instant messages to your online friends http://au.messenger.yahoo.com