Guest User

Untitled

a guest
Nov 18th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import fdb
  2. con = fdb.connect(
  3. host='host', database='database',
  4. user='IAKUZNETSOV', password='111111'
  5. )
  6. cur = con.cursor()
  7. cur.execute("select DATA from ATTACHMENTS where OID = '6512165313'")
  8. fileToSave= cur.fetchone()[0]
  9. with open('c:\python5.jpg', 'wb') as f:
  10. f.write(fileToSave)
Add Comment
Please, Sign In to add comment