I'm trying to use the API to write to a MEDIUMBLOB, but I'm getting a very vague error: something about a problem "near '' on line 1". I'm forumating the query string w/
sprintf(query, "INSERT INTO support_files (session_id,file_type,file_body) VALUES (%ld,%ld,", sessionID,fileType); Then w/calls to things like memcpy, and unformatted reads from a stream, I append the blob to the end of that, and finalize it w/a ')'. I'm very careful about what I do w/my pointers, and not to use string-handling functions on the blob data. I also use mysql_real_query(), which is where the error is returned. From what I can tell from the on-line documentation, this is the right way to handle blobs. I also tried: sprintf(query, "INSERT INTO support_files (session_id,file_type,file_body) VALUES (%ld,%ld,0)", sessionID,fileType); //exact same as before, but the blob is a mere '0' Is this right? I can use a char * to point to binary data, can't I? I'm running Linux RH9, if that makes a difference. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]