erw2 wrote:

I have follow your advice and had a look at CppSQLite. setBinary and
getBinary functions work only on unsigned char, and size of intDouble is
(on my PC) 8 bytes, so much more than unsigned char (1 byte).
The question is how to correctly store such structure in db, and how to
restore it later?

Regards
WojciechW




Hello,
when storing, create a blob from your structure and store it.
When retrieving, validate the blob (by its size, by a magic number at the end or something like that) then feed the blob into malloced memory and you get your object back (even if its a collection of objects)

Best wishes,

--
Noël Frankinet
Gistek Software SA
http://www.gistek.net

Reply via email to