[odb-users] cannot load image bytes through section

Christian Sell christian at gsvitec.com
Fri Dec 23 17:43:15 EST 2016


hello,

I am using SQLite, and heres my mappping

#pragma db type("BLOB") section(image_section)
std::vector<unsigned char> image_data;

heres the code:

odb::ransaction tr(database->begin());
database->load(*obj, obj->image_section);

the data in the database is perfect, and it was written through the same mechanism. However, when loading, I get a correct size in image_data.size(), but the data inside image_data is garbage

can anyone help?
thanks, Christian



More information about the odb-users mailing list