ORDSYS.ORDImage - ORDSYS.ORDVideo - ORDSYS.ORDAudio ????

Am I missing something? Is there an:
ORDSYS.ORDDocument ??
ORDSYS.ORDDoc ??
ORDSYS.ORDFile ??
I would like to allow users to upload external documents to an application built upon JSP, EJB's and JDBC.. but I have yet to find any 1: documentation or 2: reasonable example on this matter.
Has anyone out there developed an application like this in the past? Every example on OTN deals ONLY with Images, Audio and Video being uploaded to the db.
Any help in the matter would be greatly appreciated.
null

Why don't you look at ORACLE documentation
e.g. "Application Developers Guide - Large Objects(LOBS)"
There examples for loading a LOB with Data from a BFILE Using JDBC, C, even COBOL.
You store your document as blob and MIME type as varchar2 as suggested before.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramene Anthony ([email protected]):
Am I missing something? Is there an:
ORDSYS.ORDDocument ??
ORDSYS.ORDDoc ??
ORDSYS.ORDFile ??
I would like to allow users to upload external documents to an application built upon JSP, EJB's and JDBC.. but I have yet to find any 1: documentation or 2: reasonable example on this matter.
Has anyone out there developed an application like this in the past? Every example on OTN deals ONLY with Images, Audio and Video being uploaded to the db.
Any help in the matter would be greatly appreciated.
<HR></BLOCKQUOTE>
null

Similar Messages

  • Basic Questions regarding InterMedia

    Hi,
    I have few questions related to this Intermedia.
    1. is it client-server kind of software piece? I mean will it needed to be installed on each and every user's machine?
    2. Just to make sure , it's a programmatic way to do the conversion from text document (e.g. MS word) to the database. i.e. user types data in MS Word and then the Java program will be able to take care of the further processing. Right?
    3. Is there different kind of API that we need to use interMedia or is it that when we have proper Oracle version it is automatically available?
    Thanks-
    Kirti

    Kirti,
    Read the interMediaOverview document
    on OTN. That will answer your questions.
    interMedia option is part of ORACLE 8i Server. At the time of creating the database you have to install this option.
    It provides for managing (loading, retrieving, full-text search) rich data types
    Text (clob/blob), Image (OrdImage), Video (OrdVideo), Audio (OrdAudio).
    There are tools like Clipboard and Annotator that are part of Media Developer's kit that is downloadable from OTN.
    Over 150 document formats are supported and
    that includes word2000, pdf etc.
    Take care
    pradip
    null

  • ORDSYS.ORDIMAGE vs BLOB

    Dear all,
    I've designed a table with an ordsys.ordimage field for images. BIG MISTAKE, because there is no possibility to upload images from a form. I'd like to change it into a BLOB field but an error arises:
    "You cannot modify the column definition for types CLOB, NCLOB, BFILE, BLOBand Intermedia Object types(ORDSYS.ORDIMAGE, ORDSYS.ORDAUDIO, ORDSYS.ORDVIDEO). (WWV-17079)"
    Could I change it anyhow in order not to build a new table? I have a lot of forms referring to that table and I should change these forms too....(and we know it is pretty difficult)...
    I would appreciate any help.
    Tomas

    And you are possible to display blob from table in form s image item?
    I tried this, but it didn't go, can you tell me, how did you do?

  • ORDAudio and ORDVideo setProperties

    Hi,
    I am using ORDAudio and ORDVideo objects to store audio and video items in databse 11g.
    when i call method .setProperties() as shown below:
    byte[ ] ctx[ ] = new byte [4000][1];
    VideoObj1.setProperties(ctx);
    it is throwing exception as given below:
    for Audio:
    exception : java.sql.SQLException: ORA-29400: data cartridge error
    AUD-00706: unsupported or corrupted input format
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 75
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 65
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 29
    ORA-06512: at "ORDSYS.ORDAUDIO_PKG", line 154
    ORA-06512: at "ORDSYS.ORDAUDIO_PKG", line 314
    ORA-06512: at "ORDSYS.ORDAUDIO", line 1006
    ORA-06512: at "ORDSYS.ORDAUDIO", line 975
    ORA-06512: at line 1
    and for Video:
    exception : java.sql.SQLException: ORA-29400: data cartridge error
    VID-00714: internal error
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 75
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 65
    ORA-06512: at "ORDSYS.ORDIMERRORCODES", line 29
    ORA-06512: at "ORDSYS.ORDVIDEO_PKG", line 191
    ORA-06512: at "ORDSYS.ORDVIDEO_PKG", line 473
    ORA-06512: at "ORDSYS.ORDVIDEO", line 1142
    ORA-06512: at line 1
    can anyone please help in fixing this issue?
    When i remove the setProperties call from the code, code works fine and I am able to store my audio and video files in database.
    I am trying to upload .mp3 file and .mp4 video file.
    Thank You
    Edited by: 896943 on Dec 3, 2011 1:32 AM

    Supported formats are documented here: http://docs.oracle.com/cd/E11882_01/appdev.112/e10776/toc.htm (see appendix A and C). Audio .mp3 is not supported so you see that error. But video .mp4 is supported. The 'internal error' you are seeing indicates is a different problem. Is it possible that the file format is not really .mp4?
    The data can be stored in the database whether or not the formats are supported. If the formats are not supported then the metadata attributes cannot be extracted.

  • How to load rm file into ordAudio column?

    Hello everybody,
    I made many attempts trying to insert aa.mp3(3.63Mb) and bb.rm(3.58Mb) file into ORDSYS.ordAudio column respectively with the same way.
    the result is: aa.mp3 was inserted successfully, but the bb.rm was not. It showed the error message: "java.sql.SQLException:ORA-01401:inserted value too large for column"
    Why? How can I insert *.rm into the ordAudio column?
    main code are grateful.

    >
    >
    1.tonight, I made another trying to insert aa.mp3(3.63Mb) and bb.rm(3.58Mb) file into ORDSYS.ordAudio column respectively with the same way.
    the result is: aa.mp3 was inserted successfully, but the bb.rm was not. It showed the error message: "java.sql.SQLException:ORA-01401:inserted value too large for column"
    And the main code is as following:
    private final static String EMPTY_AUDIO = "ordsys.ordaudio.init()"; //declare the EMPTY_AUDIO
    stmt = (OraclePreparedStatement)conn.prepareStatement( //
    "insert into TAB_NOAUDIT_AUDIO(NOAU_AU_SERIALNUMBER,"+
    "NOAU_AU_TYPE,NOAU_AU_KEYWORD,NOAU_AU_FILENAME,"+
    "NOAU_AU_MEDIA)"+
    " values (?,?,?,?," + EMPTY_AUDIO +")" );
    stmt.setString( 1, id );
    stmt.setString( 2, filetype );
    stmt.setString( 3, new String(keyword.getBytes("ISO8859-1")) );
    stmt.setString( 4, new String(filename.getBytes("ISO8859-1")) );
    // System.out.println("after 4th set..()!!");
    stmt.executeUpdate();
    stmt.close();
    //load the audio media file into table
    stmt=(OraclePreparedStatement)conn.prepareStatement(
         "select NOAU_AU_MEDIA from TAB_NOAUDIT_AUDIO where NOAU_AU_SERIALNUMBER = ? for update" );
    stmt.setString( 1, id );
    rset = (OracleResultSet)stmt.executeQuery();
    while(rset.next()) {
    media = (OrdAudio)rset.getCustomDatum( 1, OrdAudio.getFactory());
    File file = new File(filepath);
    FileInputStream fStream = new FileInputStream(file);
    media.loadDataFromInputStream(fStream);
    // System.out.println("after aumedia.loadDataFromInputStream()!!");
    fStream.close();
    I don't know why the error occured?
    Whether the rm file format is not recognized by ORDSYS.ordAudio or not?
    How can i do next?
    The error you get has nothing to do with the size of the media data. The error you are getting has to do with another field somewhere I think. The error you say has nothing to do with media data, but regular SQL.
    It all depends on where the error is... Do you get the error on the media.loadDataFromInputStream(fStream);? I suspect, you are getting the error on the insert. and that id or filetype are too big for the column.
    Could you tell me where the problem occurs? On the first insert? on the update?? I really can't debug with the amount of information here.
    In general, for debugging problems, you need to break it down smaller to find the errror.
    Pleas break down your insert to find the problem.
    2.Would you mind telling me more detail step or code for copying ordAudio data from table
    to another table with the same ORDSYS.ordAudio column property?
    One media column to another would simply be
    select sound into soundvar from oldtable where .....
    insert into newtable(newsound) values (soundvar) where ...;
    If from a lob....
    select lob into lobvar from....
    soundvar.source.localdata := lob;
    soundvar.setlocal();
    soundvar.setProperties();
    Larry
    Larry

  • No return value for ordAudio.getAudioDuration

    I inserted an audio file (type WAV) into an Oracle ordsys.ordaudio column:
    l_audio.setsource('FILE','AUDIO_DIR',l_audio_file);
    l_audio.import(l_ctx);
    l_audio.setproperties(l_ctx);
    After that, i'm able to retrieve a lot of properties (MIME Type, Encoding,...), but the method getAudioDuration returns NULL.
    Is this a bug ?
    Regards, Bernhard

    Hi Bernhard,
    ORDAudio setProperties does not extract the AudioDuration for
    WAV files. Most properties extracted are those that are
    conveniently found in the file headers. For WAV files, since
    there are a number of compression schemes, computing the duration
    is not a quick and trivial operation.
    If you are sure the data is uncompressed you might be able
    to compute the duration from the other attributes (SamplingRate,
    SampleSize and length.
    Hope that helps,
    Rajiv

  • How to load and retrieve images from Portal. URGENT

    Dear all,
    I've designed a table with an ordsys.ordimage field for images. BIG MISTAKE, because there is no possibility to upload images from a form. I'd like to change it into a BLOB field but an error arises:
    "You cannot modify the column definition for types CLOB, NCLOB, BFILE, BLOBand Intermedia Object types(ORDSYS.ORDIMAGE, ORDSYS.ORDAUDIO, ORDSYS.ORDVIDEO). (WWV-17079)"
    Could I change it anyhow in order not to build a new table? I have a lot of forms referring to that table and I should change these forms too....(and we know it is pretty difficult)...
    I would appreciate any help.
    Tomas

    Tomas,
    Do you have any active constraints on that specific row? If the row is accessed by other forms (tables etc) you would need to disable them (for example foreign key constraints) and update the row (or remove and re-add it).
    Kostas

  • How to load and retrieve images from Portal!!!

    Dear all,
    I've designed a table with an ordsys.ordimage field for images. BIG MISTAKE, because there is no possibility to upload images from a form. I'd like to change it into a BLOB field but an error arises:
    "You cannot modify the column definition for types CLOB, NCLOB, BFILE, BLOBand Intermedia Object types(ORDSYS.ORDIMAGE, ORDSYS.ORDAUDIO, ORDSYS.ORDVIDEO). (WWV-17079)"
    Could I change it anyhow in order not to build a new table? I have a lot of forms referring to that table and I should change these forms too....(and we know it is pretty difficult)...
    I would appreciate any help.
    Tomas

    Tomas,
    Do you have any active constraints on that specific row? If the row is accessed by other forms (tables etc) you would need to disable them (for example foreign key constraints) and update the row (or remove and re-add it).
    Kostas

  • Download documents

    Hi,
    I need to put a button in a report to make a download of a file that is stored in a blob field in a table. How can i do it? Is it possible to do it with wizards?
    In the forum I see a lot of questions about this, in all of them they use the instruction WEB.SHOW_DOCUMENT, but I don4t know neither how nor where can I use this instruction.

    I think you cannot have links for the BLOB fields .If you have ORDSYS.ORDIMAGE,ORDSYS.ORDAUDIO or ORDSYS.ORDVIDEO type of field types then you will get it as a link and you can download them by clicking the link.

  • Missing Type Definitions on the SAmple Schema Script

    Hi Gurus,
    The following is the script taken from Oracle 9i Sample schemas page. Here the scripts for some types ORDSYS.ORDImage, ORDSYS.ORDImageSignature,ORDSYS.ORDVideo,ORDSYS.ORDAudio,ORDSYS.ORDDoc are not given.
    Can you help me in getting those.
    CREATE TABLE online_media
    ( product_id NUMBER(6)
    , product_photo ORDSYS.ORDImage
    , product_photo_signature ORDSYS.ORDImageSignature
    , product_thumbnail ORDSYS.ORDImage
    , product_video ORDSYS.ORDVideo
    , product_audio ORDSYS.ORDAudio
    , product_text CLOB
    , product_testimonials ORDSYS.ORDDoc
    ) ;

    Does your database have Oracle Intermedia installed?
    The other thing to check is whether your DBA has revoked execute on those objects from public. A couple of them served as vectors for DoS attacks against the database,
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Ordwebutl.cache_status

    I can not find this procedure and not sure how to create it.
    I am using OAS 4.0.8.1 on NT with Oracle 8.1.5
    http_status := ordwebutl.cache_status( db_mod_date,http_if_modified_since,
    http_last_modified );
    I got this sample code "MP3demo" from technet.oracle.com
    Can anyone help...
    Thanks
    null

    <oracle_home>\ord\web\admin\ordwebutl.sql
    Rem Copyright (c) 1998, 1999 by Oracle Corp. All Rights Reserved.
    Rem
    Rem NAME
    Rem ordwebutl
    Rem
    Rem PURPOSE
    Rem Oracle interMedia Web Agent PL/SQL utility package
    Rem
    Rem USAGE
    Rem sqlplus ordsys/<ordsys-password>@database @ordwebutl.sql
    Rem -- OR --
    Rem srvmgr> connect ordsys/<ordsys-password>@database
    Rem svrmgr> @ordwebutl.sql
    Rem
    Rem HISTORY
    Rem jcave 10/20/98 Initial version
    Rem ddiamond 10/22/98 Add public synonym
    Rem ddiamond 10/27/98 Remove the "; length=NNN" from date
    Rem soxbury 11/17/98 Change name to ordwebutl; same as synonym
    Rem soxbury 02/22/99 Add procedures to free temporary LOBs
    Rem ddiamond 03/22/99 Add tables and procedures for IMW catalog
    Rem
    create table mw$catalog_by_typ (
    TYPE_OWNER VARCHAR2(30)
    not null,
    TYPE_NAME VARCHAR2(30)
    not null,
    MEDIA_TYPE VARCHAR2(10)
    not null,
    LOB_TYPE VARCHAR2(10)
    not null,
    LOB_ATT VARCHAR2(100)
    not null
    create table mw$catalog_by_tab (
    TABLE_OWNER VARCHAR2(30)
    not null,
    TABLE_NAME VARCHAR2(30)
    not null,
    KEY_COLUMN VARCHAR2(30)
    not null,
    INSERT_PROC VARCHAR2(30)
    null,
    UPDATE_PROC VARCHAR2(30)
    null
    create table mw$catalog_by_col (
    TABLE_OWNER VARCHAR2(30)
    not null,
    TABLE_NAME VARCHAR2(30)
    not null,
    COLUMN_NAME VARCHAR2(30)
    not null,
    OBJ_GET_PROC VARCHAR2(30)
    null,
    OBJ_PUT_PROC VARCHAR2(30)
    null,
    OBJ_SET_PROC VARCHAR2(30)
    null
    delete from mw$catalog_by_typ where type_name = 'ORDAUDIO';
    insert into mw$catalog_by_typ values (
    'ORDSYS', 'ORDAUDIO', 'AUDIO', 'BLOB', '.SOURCE.LOCALDATA' );
    delete from mw$catalog_by_typ where type_name = 'ORDIMAGE';
    insert into mw$catalog_by_typ values (
    'ORDSYS', 'ORDIMAGE', 'IMAGE', 'BLOB', '.SOURCE.LOCALDATA' );
    delete from mw$catalog_by_typ where type_name = 'ORDVIDEO';
    insert into mw$catalog_by_typ values (
    'ORDSYS', 'ORDVIDEO', 'VIDEO', 'BLOB', '.SOURCE.LOCALDATA' );
    delete from mw$catalog_by_typ where type_name = 'ORDIMGB';
    insert into mw$catalog_by_typ values (
    'ORDSYS', 'ORDIMGB', 'IMAGE', 'BLOB', '.CONTENT' );
    delete from mw$catalog_by_typ where type_name = 'ORDVIR';
    insert into mw$catalog_by_typ values (
    'ORDSYS', 'ORDVIR', 'IMAGE', 'BLOB', '.IMAGE.SOURCE.LOCALDATA' );
    commit work;
    create or replace package ordsys.ordwebutl as
    http_status_ok constant number(3) := 200; /* OK */
    http_status_moved_perm constant number(3) := 301; /* Moved perm. */
    http_status_moved_temp constant number(3) := 302; /* Moved temp. */
    http_status_see_other constant number(3) := 303; /* See other */
    http_status_not_mod constant number(3) := 304; /* Not modified */
    http_status_forbidden constant number(3) := 403; /* Forbidden */
    * Set dbms_server_timezone to the database server's time zone, if its
    * one of the supported time zones (see new_date() SLQ function). If not
    * supported, set dbms_server_gmtdiff to difference in hours from GMT.
    dbms_server_timezone constant varchar2(3) := 'EST';
    dbms_server_gmtdiff constant number := NULL;
    function http_to_oracle_date( http_date in varchar2 ) return date;
    function oracle_to_http_date( ora_date in date ) return varchar2;
    function cache_status( db_lastmod_date in date,
    cli_ifmod_date in varchar2,
    cli_lastmod_date out varchar2 ) return number;
    procedure free_temp_blob( temp_blob in out nocopy blob );
    procedure free_temp_clob( temp_clob in out nocopy clob );
    function get_imw_typ_media_type(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2;
    function get_imw_typ_lob_type(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2;
    function get_imw_typ_lob_att(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2;
    procedure set_imw_typ_info(
    in_type_owner in varchar2,
    in_type_name in varchar2,
    in_media_type in varchar2,
    in_lob_type in varchar2,
    in_lob_att in varchar2 );
    function get_imw_tab_count(
    in_table_name in varchar2 )
    return number;
    function get_imw_tab_key_column(
    in_table_name in varchar2 )
    retu rn varchar2;
    function get_imw_tab_insert_proc(
    in_table_name in varchar2 )
    return varchar2;
    function get_imw_tab_update_proc(
    in_table_name in varchar2 )
    return varchar2;
    procedure set_imw_tab_info(
    in_table_name in varchar2,
    in_key_column in varchar2,
    in_insert_proc in varchar2,
    in_update_proc in varchar2 );
    procedure set_imw_tab_key_column(
    in_table_name in varchar2,
    in_key_column in varchar2 );
    procedure set_imw_tab_insert_proc(
    in_table_name in varchar2,
    in_insert_proc in varchar2 );
    procedure set_imw_tab_update_proc(
    in_table_name in varchar2,
    in_update_proc in varchar2 );
    function get_imw_col_obj_get_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2;
    function get_imw_col_obj_put_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2;
    function get_imw_col_obj_set_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2;
    procedure set_imw_col_info(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_get_proc in varchar2,
    in_obj_put_proc in varchar2,
    in_obj_set_proc in varchar2 );
    procedure set_imw_col_nothing(
    in_table_name in varchar2,
    in_column_name in varchar2 );
    procedure set_imw_col_obj_get_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_get_proc in varchar2 );
    procedure set_imw_col_obj_put_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_put_proc in varchar2 );
    procedure set_imw_col_obj_set_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_set_proc in varchar2 );
    pragma restrict_references( http_to_oracle_date, WNDS, WNPS );
    pragma restrict_references( oracle_to_http_date, WNDS, WNPS );
    pragma restrict_references( cache_status, WNDS, WNPS );
    pragma restrict_references( get_imw_typ_media_type, WNDS, WNPS );
    pragma restrict_references( get_imw_typ_lob_type, WNDS, WNPS );
    pragma restrict_references( get_imw_typ_lob_att, WNDS, WNPS );
    pragma restrict_references( get_imw_tab_count, WNDS, WNPS );
    pragma restrict_references( get_imw_tab_key_column, WNDS, WNPS );
    pragma restrict_references( get_imw_tab_insert_proc, WNDS, WNPS );
    pragma restrict_references( get_imw_tab_update_proc, WNDS, WNPS );
    pragma restrict_references( get_imw_col_obj_get_proc, WNDS, WNPS );
    pragma restrict_references( get_imw_col_obj_put_proc, WNDS, WNPS );
    pragma restrict_references( get_imw_col_obj_set_proc, WNDS, WNPS );
    end;
    show errors;
    create or replace package body ordsys.ordwebutl as
    * Convert an HTTP GMT-based date to an Oracle date based on the database
    * server's time zone. HTTP format: Wednesday, 25 Mar 1998 18:21:24 GMT
    function http_to_oracle_date( http_date in varchar2 ) return date is
    char_date varchar2( 64 );
    char_pos integer;
    ora_date date;
    begin
    if http_date is null
    then
    * Return NULL if no input date.
    return null;
    else
    /* Start off with the original */
    char_date := http_date;
    * First strip off the "; length=NNN" the way the comments say we're
    * supposed to. DLD, 10/27/98.
    char_pos := instr( char_date, ';' );
    if ( char_pos > 0 )
    then
    char_date := substr( char_date, 1, char_pos - 1 );
    end if;
    * Extract the part of the date we need, convert it to an Oracle date,
    * then adjust to the database server's time zone.
    char_pos := instr( char_date, ',' );
    if (char_pos = 0)
    then
    * Must be an ANSI asctime() date
    char_pos := instr( char_date, ' ');
    char_date := substr( char_date, char_pos );
    ora_date := TO_DATE( char_date, 'MON DD HH24:MI:SS YYYY' );
    else
    * RFC 822 or 850 date, or something similair
    char_date := substr( char_date, char_pos+1 );
    char_pos := instr( char_date, 'GMT' );
    if ( LENGTH(char_date) < char_pos + 3)
    then
    char_date := substr( char_date, 1, char_pos-1 );
    else
    char_date := substr( char_date, 1, LENGTH(char_date)-3 );
    end if;
    ora_date := to_date( char_date, 'DD MON YYYY HH24:MI:SS' );
    if to_char( ora_date, 'YYYY' ) < ' 0100'
    then
    ora_date := to_date( char_date, 'DD MON YY HH24:MI:SS' );
    if (ora_date < TO_DATE('01/01/1980', 'MM/DD/YYYY'))
    then
    ora_date := add_months( ora_date, 1200 );
    end if;
    end if;
    end if;
    if (dbms_server_gmtdiff is not null)
    then
    return ora_date+(dbms_server_gmtdiff/24);
    else
    return new_time(ora_date,'GMT',dbms_server_timezone );
    end if;
    end if;
    end;
    * Convert an Oracle date based on the database server's time zone to an
    * HTTP GMT-based date. HTTP format: Wednesday, 25 Mar 1998 18:21:24 GMT
    function oracle_to_http_date( ora_date in date ) return varchar2 is
    gmt_date date;
    begin
    if ora_date is null
    then
    * Return NULL if no input date.
    return null;
    else
    * Convert time to GMT, then format as per HTTP standard.
    if (dbms_server_gmtdiff is not null)
    then
    gmt_date := ora_date-(dbms_server_gmtdiff/24);
    else
    gmt_date := new_time(ora_date,dbms_server_timezone,'GMT');
    end if;
    return rtrim( substr( to_char( gmt_date, 'DAY' ), 1, 3 ) ) &#0124; &#0124;
    ', ' &#0124; &#0124;
    to_char( gmt_date, 'DD MON YYYY HH24:MI:SS' ) &#0124; &#0124;
    ' GMT';
    end if;
    end;
    * Figure out if a multi-media data item in a brower's cache is up to date.
    * Currently, this algorithm bases its decision only on the date; it should
    * also base the decision on the content length. Note the format of the
    * request: If-Modified-Since: Monday, 23-Mar-98 19:46:10 GMT; length=66
    * Currently, the entire string is passed to http_to_oracle_date(), which
    * is kind enough just to pick out the date.
    function cache_status( db_lastmod_date in date,
    cli_ifmod_date in varchar2,
    cli_lastmod_date out varchar2 ) return number is
    cli_ifmod_date_local date;
    begin
    * Is there a last-modified date associated with the data? If not,
    * there's nothing we can do.
    if db_lastmod_date is not null
    then
    * If the browser is asking if the content has changed, then convert
    * the if-modified date from GMT to local server time zone and
    * compare with the modification date from the database. If the
    * cache is still valid, then set the out-going last-modified date
    * to NULL and return the not-modified status.
    if cli_ifmod_date is not null
    then
    cli_ifmod_date_local := http_to_oracle_date( cli_ifmod_date );
    if db_lastmod_date <= cli_ifmod_date_local
    then
    cli_lastmod_date := null;
    return http_status_not_mod;
    end if;
    end if;
    * Either the browser isn't asking if the cache is valid (because its
    * not in the cache) or the cache is out of date. In either event,
    * set the out-going last-modified date to modification date from
    * database and return the OK status.
    cli_lastmod_date := oracle_to_http_date( db_lastmod_date );
    return http_status_ok;
    else
    * No modification date in the database, so no cache checking can
    * be done; set the out-going last-modified date to NULL and return
    * the OK status.
    cli_lastmod_date := null;
    return http_status_ok;
    end if;
    end;
    * Procedures to free temporary LOBs.
    procedure free_temp_blob( temp_blob in out nocopy blob ) is
    begin
    if dbms_lob.istemporary( temp_blob ) = 1 then
    dbms_lob.freetemporary( temp_blob );
    end if;
    end;
    procedure free_temp_clob( temp_clob in out nocopy clob ) is
    begin
    if dbms_lob.istemporary( temp_clob ) = 1 then
    dbms_lob.freetemporary( temp_clob );
    end if;
    end;
    * Clipboard procedures to access catalog.
    function get_imw_typ_media_type(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2
    is
    ret_media_type varchar2(10);
    begin
    select media_type
    into ret_media_type
    from mw$catalog_by_typ t
    where t.type_owner = in_type_owner
    and t.type_name = in_type_name
    and rownum = 1;
    return ret_media_type;
    end;
    function get_imw_typ_lob_type(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2
    is
    ret_lob_type varchar2(10);
    begin
    select lob_type
    into ret_lob_type
    from mw$catalog_by_typ t
    where t.type_owner = in_type_owner
    and t.type_ name = in_type_name
    and rownum = 1;
    return ret_lob_type;
    end;
    function get_imw_typ_lob_att(
    in_type_owner in varchar2,
    in_type_name in varchar2 )
    return varchar2
    is
    ret_lob_att varchar2(100);
    begin
    select lob_att
    into ret_lob_att
    from mw$catalog_by_typ t
    where t.type_owner = in_type_owner
    and t.type_name = in_type_name
    and rownum = 1;
    return ret_lob_att;
    end;
    procedure set_imw_typ_info(
    in_type_owner in varchar2,
    in_type_name in varchar2,
    in_media_type in varchar2,
    in_lob_type in varchar2,
    in_lob_att in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_typ t
    where t.type_owner = in_type_owner
    and t.type_name = in_type_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_typ values (
    in_type_owner,
    in_type_name,
    in_media_type,
    in_lob_type,
    in_lob_att );
    else
    update mw$catalog_by_typ t set
    media_type = in_media_type,
    lob_type = in_lob_type,
    lob_att = in_lob_att
    where t.type_owner = in_type_owner
    and t.type_name = in_type_name
    and rownum = 1;
    end if;
    end;
    function get_imw_tab_count(
    in_table_name in varchar2 )
    return number
    is
    ret_count int;
    begin
    select count(*)
    into ret_count
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name;
    return ret_count;
    end;
    function get_imw_tab_key_column(
    in_table_name in varchar2 )
    return varchar2
    is
    ret_key_column varchar2(30);
    begin
    select key_column
    into ret_key_column
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    return ret_key_column;
    end;
    function get_imw_tab_insert_proc(
    in_table_name in varchar2 )
    return varchar2
    is
    ret_insert_proc varchar2(30);
    begin
    select insert_proc
    into ret_insert_proc
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    return ret_insert_proc;
    end;
    function get_imw_tab_update_proc(
    in_table_name in varchar2 )
    return varchar2
    is
    ret_update_proc varchar2(30);
    begin
    select update_proc
    into ret_update_proc
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    return ret_update_proc;
    end;
    procedure set_imw_tab_info(
    in_table_name in varchar2,
    in_key_column in varchar2,
    in_insert_proc in varchar2,
    in_update_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_tab values (
    user,
    in_table_name,
    in_key_column,
    in_insert_proc,
    in_update_proc );
    else
    update mw$catalog_by_tab t set
    key_column = in_key_column,
    insert_proc = in_insert_proc,
    update_proc = in_update_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_tab_key_column(
    in_table_name in varchar2,
    in_key_column in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_tab (
    table_owner,
    table_name,
    key_column )
    values (
    user,
    in_table_name,
    in_key_column );
    else
    update mw$catalog_by_tab t set
    key_column = in_key_column
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_tab_insert_proc(
    in_table_name in varchar2,
    in_insert_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_tab (
    table_owner,
    table_name,
    insert_proc )
    values (
    user,
    in_table_name,
    in_insert_proc );
    else
    update mw$catalog_by_tab t set
    insert_proc = in_insert_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_tab_update_proc(
    in_table_name in varchar2,
    in_update_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_tab t
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_tab (
    table_owner,
    table_name,
    update_proc )
    values (
    user,
    in_table_name,
    in_update_proc );
    else
    update mw$catalog_by_tab t set
    update_proc = in_update_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and rownum = 1;
    end if;
    end;
    function get_imw_col_obj_get_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2
    is
    ret_obj_get_proc varchar2(30);
    begin
    select obj_get_proc
    into ret_obj_get_proc
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    return ret_obj_get_proc;
    end;
    function get_imw_col_obj_put_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2
    is
    ret_obj_put_proc varchar2(30);
    begin
    select obj_put_proc
    into ret_obj_put_proc
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    return ret_obj_put_proc;
    end;
    function get_imw_col_obj_set_proc(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    return varchar2
    is
    ret_obj_set_proc varchar2(30);
    begin
    select obj_set_proc
    into ret_obj_set_proc
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    return ret_obj_set_proc;
    end;
    procedure set_imw_col_info(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_get_proc in varchar2,
    in_obj_put_proc in varchar2,
    in_obj_set_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_col values (
    user,
    in_table_name,
    in_column_name,
    in_obj_get_proc,
    in_obj_put_proc,
    in_obj_set_proc );
    else
    update mw$catalog_by_col t set
    obj_get_proc = in_obj_get_proc,
    obj_put_proc = in_obj_put_proc,
    obj_set_proc = in_obj_set_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_col_nothing(
    in_table_name in varchar2,
    in_column_name in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_col (
    table_owner,
    table_name,
    column_name )
    values (
    user,
    in_table_name,
    in_column_name );
    end if;
    end;
    procedure set_imw_col_obj_get_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_get_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_col (
    table_owner,
    table_name,
    column_name,
    obj_get_proc )
    values (
    user,
    in_table_name,
    in_column_name,
    in_obj_get_proc );
    else
    update mw$catalog_by_col t set
    obj_get_proc = in_obj_get_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_col_obj_put_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_put_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_col (
    table_owner,
    table_name,
    column_name,
    obj_put_proc )
    values (
    user,
    in_table_name,
    in_column_name,
    in_obj_put_proc );
    else
    update mw$catalog_by_col t set
    obj_put_proc = in_obj_put_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    end if;
    end;
    procedure set_imw_col_obj_set_proc(
    in_table_name in varchar2,
    in_column_name in varchar2,
    in_obj_set_proc in varchar2 )
    is
    counter int;
    begin
    select count(*)
    into counter
    from mw$catalog_by_col t
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    if counter = 0
    then
    insert into mw$catalog_by_col (
    table_owner,
    table_name,
    column_name,
    obj_set_proc )
    values (
    user,
    in_table_name,
    in_column_name,
    in_obj_set_proc );
    else
    update mw$catalog_by_col t set
    obj_set_proc = in_obj_set_proc
    where t.table_owner = user
    and t.table_name = in_table_name
    and t.column_name = in_column_name
    and rownum = 1;
    end if;
    end;
    end;
    show errors;
    CREATE PUBLIC SYNONYM ORDWEBUTL FOR ORDSYS.ORDWEBUTL;
    GRANT EXECUTE ON ORDSYS.ORDWEBUTL TO PUBLIC;
    null

  • Des6i and intermedia object types

    Hi friends,
    anybody tried to capture intermedia object types like ORDSYS.ORDImage to the 6i Repos?
    I always get the error that he can't capture from ORDSYS. It is really nasty to create a column with BLOB and then change it in the DDL files.
    Someone knows a way to get around this?
    Thanks in advance
    Fritz (the Cat)

    I use Des 6i (6.5.28.8.0).
    I have tried to capture a server model from an existing database. Three of the tables have columns based on ordsys.ordimage, ordsys.ordvideo and ordsys.ordaudio. In the process of capturing the system complaints that this types can not be captured. In the database designer the column types video, audo and image are based on raw long. now Im doing the following: define the columns with type BLOB and generate ddl files; changing the BLOB to appropriated ones and run a script to build the database. you know a better way? thanks in advance Fritz

  • Blobdomain and blob

    I need to save image in database blob column, but as i get the blob from View Object, it return data type of blobdomain, can anyone tell me is it possible to convert a blobdomain to blob so that i can save it into my db. Can provide me some example code on using blob or blobdomain.

    Dear Sir...
    Are you using ADF UIX with JDeveloper 10.1.2? or what?
    There is a number of other data types to deal with multimedia contents. These are
    ORDSYS.ORDImage to deal with images
    ORDSYS.ORDVideo to deal with video
    ORDSYS.ORDAudio to deal with audio. you can use them with ADF UIX that provides upload and download capability for such fields.
    hope this help
    best regards

  • Does Oracle OSFM work with standard MRP in R12.1?

    Hello All,
             We are in R12.1.3. I read in the OSFM User Guide that Lot Based Jobs don’t work with ASCP and a comment about OM and Oracle Projects. We are currently using standard MRP. Yesterday i came to know that OSFM will not work with standard MRP. Please let me know if there is a way to make OSFM work with Standard MRP.
          We don't have ASCP and are not planning to implement it for this requirement.
    Thanks,
    Vishnu

    Hi,
    The static INIT() functions were added to the ORDIMAGE/AUDIO/VIDEO types
    in 8.1.7 to make it easier for applications to construct an ORDIMAGE/etc
    object. Given a simple table, eg:
    CREATE TABLE IMAGES ( ID INTEGER, IMAGE ORDSYS.ORDIMAGE );
    In 8.1.7 and later its simply a matter of the following to insert a new row:
    INSERT INTO IMAGES VALUES ( 42, ORDSYS.ORDIMAGE.INIT() );
    Where ORDSYS.ORDIMAGE.INIT() is simply a static function that returns an
    initialized ORDSYS.ORDIMAGE object. Prior to 8.1.7, it was necessary to
    use the standard database object type constructor syntax to initialize
    an ORDSYS.ORDIMAGE object. For example:
    INSERT INTO IMAGES VALUES (
    42,
    ORDSYS.ORDIMAGE(
    ORDSYS.ORDSOURCE( EMPTY_BLOB(), NULL, NULL, NULL, NULL, 0 ),
    NULL, NULL, NULL, NULL, NULL, NULL, NULL ) );
    Below I've included some PL/SQL functions that you can use with 8.1.6 instead
    of having to use the full constructor.
    Hope this helps,
    Simon
    CREATE OR REPLACE FUNCTION ORDIMAGE_INIT RETURN ORDSYS.ORDIMAGE AS
    BEGIN
    RETURN ORDSYS.ORDIMAGE(
    ORDSYS.ORDSOURCE( EMPTY_BLOB(), NULL, NULL, NULL, NULL, 0 ),
    NULL, NULL, NULL, NULL, NULL, NULL, NULL );
    END;
    CREATE OR REPLACE FUNCTION ORDAUDIO_INIT RETURN ORDSYS.ORDAUDIO AS
    BEGIN
    RETURN ORDSYS.ORDAUDIO(
    NULL,
    ORDSYS.ORDSOURCE( EMPTY_BLOB(), NULL, NULL, NULL, NULL, 0 ),
    NULL, NULL, EMPTY_CLOB(), NULL, NULL, NULL, NULL, NULL, NULL );
    END;
    CREATE OR REPLACE FUNCTION ORDVIDEO_INIT RETURN ORDSYS.ORDVIDEO AS
    BEGIN
    RETURN ORDSYS.ORDVIDEO(
    NULL,
    ORDSYS.ORDSOURCE( EMPTY_BLOB(), NULL, NULL, NULL, NULL, 0 ),
    NULL, NULL, EMPTY_CLOB(), NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL );
    END;
    null

  • Crying for help please help me!!!!!!!!!!!!

    Hi
    does anyone know how i can use ordimage and ordvideo in visual basic
    i created tables in oracle with two attributes of type ordsys.ordimage and ordsys.ordvideo. i inserted images and videos in these tables. i connected this table to visual basic. i want to display (retrieve) these in visual basic and i don't know how to do so
    please help!!!!
    Thanks

    Thanks for your response
    i am actually using oo4o, but i don't know how to retrieve and display an image in vb. there is orablob but i think that only supports images of type 'BLOB' not ORDSYS.ORDIMAGE
    thanks

Maybe you are looking for