From: Rodrigo Bermejo Date: 2008-09-01T12:51:52+09:00 Subject: Problems inserting PDF (Blob) to Mysql DB Hi List /. I need to insert a PDF file as a Blob to a Mysql DB. I'm doing something like this: f=File.open(x).read insert=%^INSERT INTO `main_recibos` ( `recibo_id`, `sso` , `periodo` , `recibo` ) VALUES ( '#{recibo_id}' , '#{sso}', #{periodo}, '#{f}' ); ^ @mysql.query(insert) But I am getting 'Please check the syntax of your SQL' And the error seems created by the funny chars on the binary data. I've already tried escaping in many ways the data with out success. Any idea how to get rid of this error /? Thank you -- Posted via http://www.ruby-forum.com/.