problems storing files in blobs -
01-13-2006
, 07:09 AM
Hi,
i'm using mysqlpp 2.0.6
I'm trying to store an image in a blob. Unfortunatly from time to time i
get sql-syntax error when file content contains " or ' or similar.
Here's what i'm doing
buffer contains char * read from file
std::string fill ( buffer, file_size );
mysqlpp::escape_string( fill );
delete [] buffer;
//Func def comes here
/**
führt einen Insert Befehl aus und liefert die Insert ID
*/
int CMySqlConnector::executeInsert( std::string sql, const bool log,
bool replaceSlash )
{
try
{
Query query = m_clConnection.query();
from time to time this works but if filecontent contains any sql chars
like " statement fails due syntax errors.
How do i tell query to ignore "filecontent" when syntax parsing is done ?
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw