Hello,
I need some help with storing the result from a query into a struct.
I have a query like :
SELECT Echo.Position, Echo.Depth, Echo.dBLevel, Echo.Time,
Echo.CommonIdx, Common.ChanNr
FROM Echo JOIN Common ON Echo.CommonIdx = Common.CommonIdx
ORDER BY Echo.Position ASC
and i need to store the information in a struct like :
typedef struct
{
UINT64 nPosition;
UINT16 nDepth;
UINT8 ndBLevel;
UINT64 nTime;
UINT64 nIdx;
UINT8 nChannel;
}
now i use the function :
rc = sqlite3_exec(m_SqLiteDB, sQuery, callback, 0, &zErrMsg);
static int callback(void *NotUsed, int argc, char **argv, char **azColName)
{
//print to screen....
}
The query runs, and the results are shown in the callback function, but
i'm sure there is a better way
to strore the data in the struct then converting the strings back to
values.....
Are there any examples ?
With kind regards,
Mark Flipphi
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users