title: The first argument to execute must be a string or unicode query
body: <p>I am trying to upload a blob data to ms-sql db, using pyodbc. And I get <strong>"the first argument to execute must be a string or unicode query"</strong> error.</p>
  
  <p>The code is</p>
  
  <pre><code>file = pyodbc.Binary(open("some_pdf_file.pdf", "r").read())
  
  cur.execute("INSERT INTO BlobDataForPDF(ObjectID, FileData, Extension) VALUES ('1', " + file + ", '.PDF')")
  cur.commit()
  </code></pre>
  
  <p>The first argument, ObjectID, is sent as a string. I don't see any problem but am I missing something?</p>