Mysql_stmt_send_long_data can support the update statement?

sprintf(sql,"update DATE1 set Photo=? and Size=%d where UserID='%s'",iSize,AccountID);
MYSQL_STMT* smtt = NULL;

MYSQL_BIND bind[1];
unsigned long length;
memset(bind, 0, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG_BLOB;
bind[0].length= &length;
bind[0].is_null= 0;
smtt = mysqlcon.ExecInsert(sql,smtt,bind,1);
if(smtt)
{
if (!mysql_stmt_send_long_data(smtt,0,M_Request,iSize))
{
mysql_stmt_execute(smtt);
return true;
}
}

Parameter LONGBLOB here with? The execution result is not successful, and the Internet are telling you
#define INSERT_QUERY "INSERT INTO bintest(id, data) VALUES(4, ?)"
Add this operation. Then how to do? The raw data into delete? Again? This reduces the efficiency of!
Then the binary data, how to perform the update.?

Started by Ignatz at November 23, 2016 - 12:30 PM

Update is also possible, this function is only to send the blob chunk value.
Post your complete code have a look.

Posted by Jonathan at December 03, 2016 - 12:58 PM