1 message in com.mysql.lists.plusplusHow to get the BLOB data size...
FromSent OnAttachments
Ajit Chourasia26 Nov 2002 19:38 
Subject:How to get the BLOB data size...
From:Ajit Chourasia (aji@qualcomm.com)
Date:11/26/2002 07:38:43 PM
List:com.mysql.lists.plusplus

Hi ,

I have the following code ... which selects 2 columns from a table column1 is tinyint column2 is MEDIUM BLOB

Result res = selectQuery.store( selectBuf.str() ); Result::iterator iter = res.begin(); Row row; for ( ;iter != res.end();++iter) { row = *iter; int i = (int)row["COLUMN1"]

// Is this correct way to read the Blob data. const char * flattenedData = row["COLUMN2"].get_string().data();

// is this correct way to get the size of Blob data. I am not getting correct result

int flattenLen = row["COLUMN2"].get_string().size();

}

I there any problem in getting the size as above. What is the best way to get the Blob data size.

Any help will be highly appreciated....

Ajit