on 10-12-2012 11:43 AM
Dear Experts,
I would like to load an image into a CLOB filed in a table. Please guide me as to how this can be done.
Thanks in Advance!!!
Rajesh.
Hi Rajesh,
Do you mean CLOB or BLOB to load the image. CLOB is character Large Object. I think you mean Binary Large Object (BLOB) to load the image.
Please find the thread below on the exact same topic.
http://scn.sap.com/thread/3242930
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to upload using python you can use this:
#!/usr/bin/python
con = dbapi.connect(‘hanahost', 30015, 'SYSTEM', '********') #Open connection to SAP HANA
cur = con.cursor() #Open a cursor
file = open('doc.pdf', 'rb') #Open file in read-only and binary
content = file.read() #Save the content of the file in a variable
cur.execute("INSERT INTO BLOBTEST VALUES(?,?)", (2,content)) #Save the content to a table
file.close() #Close the file
cur.close() #Close the cursor
con.close() #Close the connection
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.