Skip to Content
author's profile photo Former Member
Former Member

Upload binary file and save it to Oracle

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

upload-the-file

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2006 at 04:59 PM

    The main Idea - LONG RAW!!!

    CREATE TABLE PHOTO

    (

    ID NUMBER,

    PHOTO_CONTENT LONG RAW !!!!

    )

    and

    PROCEDURE SAVE (F_CONTENT IN LONG RAW)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.