I need to save an wxBitmap to SQLite to a blob type without save to disk or on some media.
i have mybitmap as wxBitmap;
First must convert to wxImage and get data.
Second convert to string and that way to store to blob column of database.
But wxMessageBox(sName) gives nothing.
What i am doing wrong?
On line 6, you are creating a std::string as far as the first zero value in the buffer. NOT all the char array; just as far as the first zero value in it.
That's how the string constructor works. Otherwise how does it know where the end of your char array is? You're passing it a c-string, and a c-string finishes at the first zero value.
There is another constructor you can use in which you tell the string how many char it should read: std::string sName(myBuffer, number_of_char_to_read);
Don't get the number wrong. Can you not just save the char data directly, without converting to string?