[odb-users] Corrupting unsigned char* when saving to database(pgsql)

Ай Мэн i_man90 at mail.ru
Tue Aug 4 05:57:54 EDT 2015


 I have a problem with saving SHA hash to database. When I save and load it back from db, it becomes corrupted(filled with one type symbol like a - 25cccccccccccccccccc). I'm mapping this array with:
#pragma db type("BYTEA(20)")
unsigned char hash_[20];
 What's the problem? I've searched for solution through internet, but there's no any forums.

cheers



More information about the odb-users mailing list