Mark Flipphi wrote: > 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);
You may find it easier to use sqlite3_prepare, sqlite3_step, sqlite3_column_* et al. For one thing, you'll avoid conversion from integers to strings and back. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users