Re: WEBD, OAS, Intermedia text and oracle 8i
Date: Fri, 07 May 1999 03:50:46 GMT
Message-ID: <37325b0b.5204473_at_newshost.us.oracle.com>
On Thu, 6 May 1999 14:17:31 +0200, "Olivier" <oveit_at_infeurope.lu> wrote:
>We actually developp a project using Oracle 8i, OAS, WEDB and Intermedia
>Text.
>
>We have actually problems for using Intermedia and Webdd :
>
>1) UPLOAD WORD document into database threw web interface
>- How can we, directly threw a web interface, upload a word document into a
>blob (we are using the html tag 'input type = file'). For the moment, the
>solution we found is to us the sqlldr command.
>- Can we use blob type in an insert command ?
>- Is it possible to run the command sqlldr from PL/SQL code ?
>- What is the difference between a CLOB and a BLOB ? What have we to use for
>Word, excel, pdf... documents ?
Today, there is no way to generate a WebDB component which can let you upload a file into the database. You would have to write a custom procedure to do this.
But the WebDB listener does support a very easy interface to move files into and out of the database. In your distribution, check for the files docload.sql and testdoc.sql. These are the procedures and tables that are integrated with the upload/download capability of the WebDB listener. These are a good example of how to use this functionality.
To see this sample code in action on your machine, execute http://<your_machine>/webdb/webdb.wwv_testdoc.show_form.
Note that the current version of the WebDB listener only supports upload/download from a LONG RAW column. You may see this change to native BLOB support in a future release.
>
>2) DOWLOAD HTML Document from database
>- Once Intermedia has generated the HTML format into a table, how can we
>print the HTML to the web interface without using sqlldr
When you say "once intermedia has generated the HTML format into a table", I'm assuming that you're referring to the CTX_DOC.FILTER and CTX_DOC.MARKUP procedures in the interMedia Text API to generate HTML renditions of the uploaded documents. Since the HTML rendition is placed into a CLOB, you can output this HTML with a procedure similar to:
create or replace procedure showdocs(
p_id number )
is
l_clob clob; l_offset integer; l_buffer varchar2(32767); l_amt integer := 32767;
begin
select document into l_clob from context_markup where query_id = p_id;
l_offset := 1;
begin
loop dbms_lob.read( l_clob, l_amt, l_offset, l_buffer ); htp.print(l_buffer); l_offset := l_offset + l_amt; l_amt := 32767; end loop; exception when no_data_found then null; end;
end;
>
>3) WEBDB
>- How can we use the "contains" command from intermedia in a wizzard report
>without changing the code generating by webdb ?
>- How change the code in manual reports when the SQL command is to long ?
You can build your report against a table which has an interMedia Text index built on it. But you will have to choose the report based on a SQL query, and include a bind parameter in the CONTAINS function of your query (e.g., ...FROM doc_table
WHERE CONTAINS( content, :critera) > 0 )
>
>
>thank you very much for your answers....
>
>
>Olivier VEIT
>Infeurope
>
>
Thanks!
Joel
Joel R. Kallman Oracle Service Industries
Columbus, OH http://govt.us.oracle.com jkallman_at_us.oracle.com http://www.oracle.com
The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. Received on Fri May 07 1999 - 05:50:46 CEST