António Santos wrote:
> I have an array of bytes (unsigned char) and I want to insert those
> bytes into a table.
I would first examine whether this is the best table design.
Array-of-anything should almost always map to rows in a separate table,
not a column containing N values. It's a one-to-many relationship, one
of the main reasons databases can hold multiple tables.
> The provided example doesn't help me that much
> because it uses binary data read from a file.
examples/load_jpeg.cpp doesn't insert a file into the database, it
inserts a std::string into the database, and a std::string is just a
fancy way to hold an array of characters. The fact that the string
happens to be populated from a file in this case is incidental.