Hi, I'm trying to pass object pointer from aggregate function to the result set.
The function set the result in this way: Mem *pBest; pBest = sqliteMalloc(sizeof(*pBest)); if( !pBest ) return; pBest->i = toref(value); // i set //pBest->r = 0; //pBest->z = 0; pBest->flags = MEM_Static; pBest->type = MEM_Int; pBest->xDel = &sqlite3FreeObject; sqlite3_result_value(context, pBest); But when i try to fetch the value always get SQLITE_NULL with Mem->i = 1 After playing with the code for a while i didn't understand what is the function of sqlite3VdbeMemShallowCopy(Mem *, Mem *, int) in vdbemem.c the value i pass copied or duplicated by it or what happen to the value i supplied. My question is: What happen to my sqlite_value? Also i have note If Mem->xDel is not NULL SQLite pass only Mem->z why not pass the whole Mem* . I'm not expert in C but please advise me if I miss anything. I know SQLite don't support custom "storage" datatype. but why not support custom data fetching. Thanks, Mina. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------