cancel
Showing results for 
Search instead for 
Did you mean: 

Upload binary file and save it to Oracle

Former Member
0 Kudos

Hello all!

I use htmlb:fileupload to get file (someimage.jpg) from client to server. Then I must save it to Oracle DB.

So I have the same problem as Scott Yang

But I have to use <u>external</u> DB Oracle.

So the main question is:

which local and oracle types i should use.

I tried very many situations and now have working this variant:

<b>SAP</b>:

DATA: Xcontent <b>TYPE X</b>

XContent = fdata->file_content.

<b>Oracle</b>:

create table S

(F_Content <b>BLOB</b>)

procedure save(f_content IN <b>RAW</b>)

But the main problem is that X reprresents only one Byte, but I need to save all file!

type XSTRING throuhs BSP exception

Could you give working example of howto save binary data (file) to Oracle?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The main Idea - LONG RAW!!!

CREATE TABLE PHOTO

(

ID NUMBER,

PHOTO_CONTENT LONG RAW !!!!

)

and

PROCEDURE SAVE (F_CONTENT IN LONG RAW)