Hi
I am trying to save bitmap images in a InnoDB table in a field that is
declared a lonblob. I am using the ODBC API of Microsoft Visual Studio 6 and
saving it to MySQL via the MyODBC Driver version 3.51. The MySQL version is
4.0.12-nt. Seems like I can only save four bytes and retrieve bytes instead
of the whole BMP.
Here is the code for writing the image to a buffer - (char* image)
CFile file;
file.Open(filename.c_str(), CFile::modeRead | File::typeBinary);
CFileStatus status;
file.GetStatus(status);
image = new char[status.m_size];
for (int i = 0; i < status.m_size; ++i)
image[i] = '0';
file.Read(image, status.m_size);
I then make a query containing the buffer and then use SQLPrepare and
SQLExecute functions to save the data to the database.
Can anybody help?
Franz Klein
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]