title: Updating container (binary blob) to FileMaker via pyodbc
body: <p>I want to UPDATE an image in a local FileMaker database using the ODBC connection.</p>
  
  <p>I expected that the following code would work, but it fails:</p>
  
  <pre><code>import pyodbc
  
  with open('myimage.jpg', 'rb') as f:
      img = f.read()
  # ensure we have a valid image
  assert isinstance(img, bytes)
  assert len(img) == 10506
  
  dsn = 'DRIVER=/Library/ODBC/FileMaker ODBC.bundle/Contents/MacOS/fmodbc.so;Server=127.0.0.1;Port=2399;Database=MyDatabase;UID=Admin;PWD='
  cnxn = pyodbc.connect(dsn)
  cnxn.setencoding(encoding='utf-8')
  cnxn.setdecoding(pyodbc.SQL_CHAR, encoding='macroman')
  
  cursor = cnxn.cursor()
  
  q = "UPDATE MyTable SET PutAs(Image, 'JPEG')=? WHERE Id=?"
  cursor.execute(q, img, 37370)
  </code></pre>
  
  <p>It raises an exception: <code>ProgrammingError: '42000', '[42000] [FileMaker][FileMaker] FQL0001/(1:18): There is an error in the syntax of the query. (8310) (SQLPrepare)'</code>.</p>
  
  <p>Reading an images with <code>SELECT GetAs(Image, 'JPEG') FROM MyTable WHERE Id=37370)</code> works fine. I receive a bytes objects which is the image.</p>