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

Similar Messages

  • Problem with InterMedia ClipBoard

    Hi
    i am trying to use the Code wizard to create the Get_object , put_object, insert_row procedures for inserting/updating BLOB data into oracle database
    However the code editior gives an error
    The code generated is as follows and the error is as follows
    I am not able to figure out why it should give an error at this location though.
    Please can some one help
    The code is as follows
    procedure INSERT_CONTENT_ROW
    in_ID in varchar2,
    in_AUTHOR in varchar2,
    in_CONTENT_NAME in varchar2,
    out_rowid out varchar2
    as
    begin
    insert into CONTENTS ( ID, AUTHOR, CONTENT_NAME, DOCS ) values ( in_ID, in_AUTHOR, in_CONTENT_NAME, .BLOB ( ) ) returning rowid into out_rowid;
    end;
    ----------The error generated in code Editior is as below----
    WM-00521: OCI returned OCI_SUCCESS_WITH_INFO; ORA-24344: message not available
    Line: 10, Column: 105: PLS-00103: Encountered the symbol "." when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute cast trim forall
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    The symbol "<an identifier>" was substituted for "." to continue.
    When I run the same code in SQL*Plus this is the error I get
    procedure INSERT_CONTENT_ROW
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    Now i am new to Intermedia and the BLOB usage so could not figure out much
    I would also be gla if someone can refer me to some good reference material on the Intermedia standard procedures, functions and other developer related material.
    By the way, the config is as follows:
    oracle8.1.5/InterMedia Web agent/clipBoard, Win NT, Apache1.3.9
    Thank you
    -nandeep

    Hi
    When I try to generate procedures with code generator in Intermedia Clip Borad I get errors as listed against each of the procedure
    1. GET_CONTENT_DOC
    --to retrive documents from document column
    --which is a BLOB type column:
    --By the way the documents column name is DOCS in the database
    procedure GET_CONTENT_DOC
    ord_procedure_path in varchar2,
    http_if_modified_since in varchar2,
    http_status out varchar2,
    http_last_modified out varchar2,
    ord_content_type out varchar2,
    ord_content_length out number,
    ord_content_blob out blob
    as
    db_mod_date date;
    begin
    /* get the content, content type, last-modified date from the object. */
    select
    t.DOCS.GetContent(),
    t.DOCS.GetMimeType(),
    t.DOCS.GetUpdateTime()
    into
    ord_content_blob,
    ord_content_type,
    db_mod_date
    from CONTENTS t
    where
    t.ID = ord_procedure_path
    and rownum = 1;
    /* if we didn't know the content type, it's just bits */
    if ord_content_type is null
    then
    ord_content_type := '/x-unknown';
    end if;
    /* figure out the length */
    ord_content_length := dbms_lob.getlength( ord_content_blob );
    /* figure out the http status and last modified date */
    http_status := ordwebutl.cache_status(
    db_mod_date, http_if_modified_since, http_last_modified );
    end;
    ERROR is a s follows:
    WM-00521: OCI returned OCI_SUCCESS_WITH_INFO; ORA-24344: message not available
    Line: 17, Column: 9: PLS-00201: identifier 'T.DOCS' must be declared
    Line: 16, Column: 5: PL/SQL: SQL Statement ignored
    2. PUT_CONTENT_DOC
    -- to insert a document
    procedure PUT_CONTENT_DOC
    ord_procedure_path in varchar2,
    http_status out varchar2,
    ord_content_blob out blob
    as
    begin
    /* set the blob to empty before we return a handle to it */
    /* and set the content type from the one passed in */
    update CONTENTS t
    set t.DOCS = .BLOB ( )
    where
    t.ID = ord_procedure_path
    and rownum = 1;
    /* now select the blob we're going to update */
    select t.DOCS.GetContent()
    into ord_content_blob
    from CONTENTS t
    where
    t.ID = ord_procedure_path
    and rownum = 1
    for update;
    /* return http status OK */
    http_status := 200;
    end;
    ERROR is as follows:
    MWM-00521: OCI returned OCI_SUCCESS_WITH_INFO; ORA-24344: message not available
    Line: 13, Column: 18: PLS-00103: Encountered the symbol "." when expecting one of the following:
    ( - + mod null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current max min prior sql stddev sum variance execute
    cast trim forall
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    The symbol "<an identifier>" was substituted for "." to continue.
    The INSERT_DOCUMENT got created thru SQL*Plus. However I have NOT changed the .BLOB to EMPTY_BLOB() and I am still not sure whether it will work and whether I have to change it empty_blob()( iguess technically I should )
    thank u
    -nandeep
    null

  • Mediaget/getimage

    I have the following stored procedure to get images from the database to into my asp.
    PROCEDURE GETIMAGE (
    ord_procedure_path in varchar2,
    http_if_modified_since in varchar2,
    http_status out varchar2,
    http_last_modified out varchar2,
    http_redirect out varchar2,
    ord_content_type out varchar2,
    ord_content_length out number,
    ord_content_blob out blob,
    ord_content_bfile out bfile
    as
    localImage ordsys.ordimage;
    begin
    * Retrieve the image object from the database into a local object.
    select IMAGE into localImage from PD_UPLOAD_IMAGE where SEQ = ord_procedure_path;
    * Figure out the status of the client's cache. If the client's cache
    * is up to date, then we can return immediately.
    http_status := ordwebutl.cache_status( localImage.getUpdateTime(),
    http_if_modified_since,
    http_last_modified );
    if http_status = 304 then
    return;
    end if;
    * Figure out where the image is.
    if localImage.isLocal() then
    * The image is stored locally in the localData BLOB attribute
    ord_content_type := localImage.getMimeType();
    ord_content_length := localImage.getContentLength();
    ord_content_blob := localImage.getContent();
    elsif upper( localImage.getSourceType() ) = 'FILE' then
    * The image is stored as a file from which ORDSource creates a BFILE.
    ord_content_type := localImage.getMimeType();
    ord_content_length := localImage.getContentLength();
    ord_content_bfile := localImage.getBFILE();
    elsif upper( localImage.getSourceType() ) = 'HTTP' then
    * The image is referenced as an HTTP entity, so we have to redirect
    * the client to the URL which ORDSource provides.
    http_status := 302;
    http_redirect := localImage.getSource();
    else
    * The image is stored in an application-specific location for
    * which no default action is available.
    null;
    end if;
    end;
    This works just fine, now i want to transform the procedure so it returns thumbnails of the original image.
    i tried to put folowing code right after the select
    localImage.process('maxScale=32 32');
    localImage.setproperties;
    but it never returns thumbnails
    (500 internal server error)
    how do i have to transform my code to get back thumbnails without changing the original image in the database of course
    thx

    Hi,
    This is failing because BLOBs have to be locked before they can be written. (By default, the Web Agent uses HTTP errors. Change the request from .../mediaget/... to .../~mediaget/... and you'll see the real SQL error.)
    However, if you change the SELECT statement to include FOR UPDATE, then you'll end up permanently changing the data in the database, which is not what you want. (The Web Agent does a commit at the end of each successful request.)
    The most efficient approach would be to create a thumbnail column in the table, and store the thumb-nail images there. Thumb-nail images could be created either when media is inserted into the database or the first time a thumb-nail is requested by a client. Alternatively, you can always create a thumb-nail at retrieval time, but image processing such as this is a relatively expensive operation - it would certainly slow down the server if you had lots of concurrent users, all retrieving thumb-nail images.
    If you still want to create a thumb-nail dynamically (throwing it away once its been delivered to the client), you can use a temporary BLOB. For example, you could do something like the following (WARNING: typed, but not tested!!).
    In the declarative section, add:
    thumbnail ordsys.ordimage;Leave the SELECT statement alone (don't add FOR UPDATE), and create the thumb-nail image as follows. See "Oracle8i Supplied PL/SQL Packages Reference" for more information on the DBMS_LOB package and the dbms_lob.createTemporary method. See "Oracle8i Application Developer's Guide - Large Objects (LOBs)" for more information on LOBs in general.
    thumbnail := ordsys.ordimage.init();
    dbms_lob.createTemporary( thumbnail.source.localdata,
    true,
    dbms_lob.session );
    localImage.processCopy( thumbnail, 'maxScale=32 32' );
    ord_content_type := thumbnail.getMimeType();
    ord_content_length := thumbnail.getContentLength();
    ord_content_blob := thumbnail.getContent();The Web Agent automatically frees temporary BLOBs once the data has been delivered to the client.
    Hope this helps,
    Simon
    null

  • Error in clipboard: ORDWEBUTL package not found

    Hi,
    I installed WebAgent 8.1.5.4 and Clipboard 8.1.5.3 (from one installation kit). WebAgent works fine. Something wrong with the Clipboard. I managed getting into Clipboard and even able to view tables of a schema. When I double click on any table name, a message prompt out saying
    "The ORDWEBUTL package was not found in the requested database."
    Anybody can give me a hint what is the installation package that can lead to this ORDWEBUTL package installed into 8i? And how to install it?
    My environment:
    Windows NT 4
    Oracle 8.1.5
    Apache web server 1.3.12
    WebAgent 8.1.5.4
    Clipboard 8.1.5.3
    Dawson

    There is a SQL script in
    (ORAWEB_HOME)\ord\web\admin (in my setup it is D:\oracle\oraas\ord\web\admin) called ordwebutl.sql.
    This needs to be run before doing anything within the clipboard. The usage for running this is within the header of the script itself.

  • Intermedia - ORDWEBUTL package NOT found Error.

    Hi,
    The intermdeia Clipboard gives the following error message :
    The ORDWEBUTL package was not found in the requested database. Please contact your database administrator.
    How do I install this package in the database ?
    My OS : Windows 2000 Pro.
    Web server : iPlanet Web Server, Enterprise Edition 4.1
    Database :
    Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
    With the Partitioning option - JServer Release 8.1.6.0.0 Production.
    The webagent and Clipboard installation seems to be fine.
    Do we need OAS on the server side to run the example that uses interMedia to load and play MP3 from Oracle8i ?
    Thanks,
    Nathan
    null

    You can find the ordwebutl.sql script in your <ORACLE_HOME>od\web\admin.
    You can use the Web server of your choice, and it can reside on any machines. When you set up the Web Agent, just provide the appropriate information about the database you are connecting.

  • ORDImageSignature Invalid data type in Oracle 8i

    hi there,
    i have just started working on Intermedia, i am using Oracle 8i. i have configured the intermedia and executed the ordwebutl.sql file. all othe media data types are working perfectly like, ORDAudio, ORDImage,ORDVideo, but the ORDIMageSIgnature is not working at all. when i use it as data type in any table it says Invalid data type. which means oracle 8i is not recognizing ORDImageSIgnature at all. plz help me as soon as possible. Thanks in advance.

    The ordimagesignature is not something you can see or hear. It is strictly binary metadata about the image, used only to compare images to each other.
    What are you trying to do?
    Larry

  • Proxy server v4.0.9 not caching as expected

    I've 2 Web proxy server configured in reverse mode and in the same proxy array.
    I'm just doing basic testings and noticed a document is not cached by the proxy array, while I think it should.
    The proxy access log is as follows (nothing in the error log):
    192.168.101.245 - - [20/Apr/2009:15:20:23 +0100] "GET /at06_REDESIGN.css HTTP/1.1" p2c_hl:489 p2c_cl:27147 p2c_rc:200 r2p_hl:415 r2p_cl:27147 r2p_rc:200 c2p_hl:596 c2p_cl:- p2r_hl:671 p2r_cl:- DNS_time:5 p2r_cnx_time:0 p2r_init_wait:8 p2r_full_wait:18 Total_time(us):24000 c_fin_status:FIN r_fin_status:FIN cache_status:ABORTED
    I can't figure out why the the final cache status is always ABORTED while for other documents of the same kind (.js files for example), the proxy caches them.
    Here's the full HTTP request and answer, from the browser point of view, when I try to get the document from a non master member of the array:
    http://livecache002.front.dc2.mydomain.com:8080/at06_REDESIGN.css
    GET /at06_REDESIGN.css HTTP/1.1
    Host: livecache002.front.dc2.mydomain.com:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
    Accept: text/css,*/*;q=0.1
    Accept-Language: en-gb
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://livecache002.front.dc2.mydomain.com:8080/QA/siteundermaintenance.html
    Cookie: s_lastvisit=1239889603182; CP=null*; JSESSIONID=864758F37F32BED06B37DD228F795F34; s_cc=true; SC_LINK=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D
    HTTP/1.x 200 OK
    Content-Length: 27147
    Content-Type: text/css
    Date: Mon, 20 Apr 2009 13:42:15 GMT
    Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a mod_jk/1.2.2
    Cache-Control: max-age=3600
    Expires: Mon, 20 Apr 2009 14:42:15 GMT
    Last-Modified: Fri, 03 Apr 2009 15:33:19 GMT
    Etag: "3b57f-6a0b-49d62c3f"
    Accept-Ranges: bytes
    Via: 1.1 proxy-cache2
    Proxy-agent: Sun-Java-System-Web-Proxy-Server/4.0
    Here's what I see if I access through the master proxy of the array, called livecache001 :
    http://livecache001.front.dc2.mydomain.com:8080/at06_REDESIGN.css
    GET /at06_REDESIGN.css HTTP/1.1
    Host: livecache001.front.dc2.mydomain.com:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
    Accept: text/css,*/*;q=0.1
    Accept-Language: en-gb
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://livecache001.front.dc2.mydomain.com:8080/QA/siteundermaintenance.html
    Cookie: CP=null*; s_lastvisit=1239889603182; JSESSIONID=3E4EC776B5BA3ADF54FE05F87623034B; s_cc=true; SC_LINK=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D
    HTTP/1.x 200 OK
    Content-Length: 27147
    Content-Type: text/css
    Date: Mon, 20 Apr 2009 14:20:23 GMT
    Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a mod_jk/1.2.2
    Cache-Control: max-age=3600
    Expires: Mon, 20 Apr 2009 15:20:23 GMT
    Last-Modified: Fri, 03 Apr 2009 15:33:19 GMT
    Etag: "3b57f-6a0b-49d62c3f"
    Accept-Ranges: bytes
    Via: 1.1 proxy-cache2, 1.1 proxy-master
    Proxy-agent: Sun-Java-System-Web-Proxy-Server/4.0, Sun-Java-System-Web-Proxy-Server/4.0
    The master determines the document should be retrieved from the other proxy, but since that proxy doesn't
    cache the document, the master can't help in such a case.
    Here's what I see for a successfully cached document (retrieved from the master proxy in the array, by the non master proxy) :
    http://livecache002.front.dc2.mydomain.com:8080/common/browsing_func.js
    GET /common/browsing_func.js HTTP/1.1
    Host: livecache002.front.dc2.mydomain.com:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
    Accept: */*
    Accept-Language: en-gb
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://livecache002.front.dc2.mydomain.com:8080/QA/siteundermaintenance.html
    Cookie: s_lastvisit=1239889603182; CP=null*; JSESSIONID=864758F37F32BED06B37DD228F795F34; s_cc=true; SC_LINK=%5B%5BB%5D%5D; s_sq=%5B%5BB%5D%5D
    HTTP/1.x 200 OK
    Content-Length: 8875
    Content-Type: application/x-javascript
    Date: Mon, 20 Apr 2009 13:42:15 GMT
    Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a mod_jk/1.2.2
    Cache-Control: max-age=3600
    Expires: Mon, 20 Apr 2009 14:42:15 GMT
    Last-Modified: Wed, 15 Oct 2008 11:00:17 GMT
    Etag: "31ff2-22ab-48f5cd41"
    Accept-Ranges: bytes
    Via: 1.1 proxy-master, 1.1 proxy-cache2
    Proxy-agent: Sun-Java-System-Web-Proxy-Server/4.0, Sun-Java-System-Web-Proxy-Server/4.0
    Basically, both proxies have exactly the same caching configuration: each possible must be cached, if possible, without low size limit.
    Any idea of what could be wrong ?

    Now that I have the error log level set to fine, I think I see the problem, which looks like a bug in the proxy:
    My (reverse) proxy server is in the "GMT+1" timezone. When it gets a document from the backend server,
    the header shows the document is valid for one our, but the proxy erroneously considers, according to its
    error log, that the document is expired, as shown in the following error log extract:
    [21/Apr/2009:14:36:33] fine (25681): CORE7205: document http://himalia.nlw.mydomain/structure_images/footerNavDivider.gif will not be cached, expired on Tue Apr 21 14:36:33 2009
    14h36 is my proxy server local time, so it's 13h36 GMT.
    Here're the headers in the request and answer:
    http://livecache001.front.dc2.mydomain:8080/structure_images/footerNavDivider.gif
    GET /structure_images/footerNavDivider.gif HTTP/1.1
    Host: livecache001.front.dc2.mydomain:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-gb
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: CP=null*; s_lastvisit=1240319966219; rsi_ct=2009_4_20:1; rsi_segs=; JSESSIONID=13D24F4986FA8E67CC62E10F145103A5; s_sq=%5B%5BB%5D%5D; SC_LINK=%5B%5BB%5D%5D; s_cc=true
    If-Modified-Since: Wed, 18 Mar 2009 12:06:20 GMT
    If-None-Match: "2e551-2c-49c0e3bc"
    Cache-Control: max-age=0
    HTTP/1.x 304 Not Modified
    Date: Tue, 21 Apr 2009 13:36:33 GMT
    Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a mod_jk/1.2.2
    Etag: "2e551-2c-49c0e3bc"
    Expires: Tue, 21 Apr 2009 14:36:33 GMT
    Cache-Control: max-age=3600
    Via: 1.1 proxy-master
    Proxy-agent: Sun-Java-System-Web-Proxy-Server/4.0
    The proxy header states the document will expire at 14h36 GMT (so 15h36 local time), but its error log states the document
    won't be cached because it has already expired, while it's 14h36 local time .

  • Where can I find the appropriate text string for China Time zone?

    Hi,
    Where can I find the appropriate text string for China Time zone?

    Hi,
    The following timezone strings are supported in Oracle8i 8.1.7:
    AST, ADT: Atlantic Standard or Daylight Time
    BST, BDT: Bering Standard or Daylight Time
    CST, CDT: Central Standard or Daylight Time
    EST, EDT: Eastern Standard or Daylight Time
    GMT: Greenwich Mean Time
    HST, HDT: Alaska-Hawaii Standard Time or Daylight Time.
    MST, MDT: Mountain Standard or Daylight Time
    NST: Newfoundland Standard Time
    PST, PDT: Pacific Standard or Daylight Time
    YST, YDT: Yukon Standard or Daylight Time
    Since your's isn't one of these, I'm hoping this is in reference to the Web Agent's ORDWEBUTL package, in which case, you can use an offset from GMT instead. For example, here in New Hampshire, USA, we are 5 hours behind GMT, so the offset would be -5, while in France, it would be +1 as they are one hour in front of GMT. According to my Windows clock, Beijing is GMT +8. Of course, you'll have to figure daylight-savings time into the equation, if you have to deal with such changes.
    Regards,
    Simon
    null

Maybe you are looking for

  • Regarding Packaged function...!

    Hi, i have a packaged function which i am trying to use in my report query.... i am passing 2 params for this function..... one is report parameter and the other one is a col in the select query.... so i need to get rows returned based on the condito

  • Run a batch file from demantra workflow

    I am trying to run a batch file from demantra's workflow by creating an executable step. I am getting the following error. Error description ''Invalid command line:''"D:\Oracle Demantra Spectrum\Collaborator\demantra\sop\populate_staging.bat" I am gi

  • Export to pdf with missing links

    I recieved a indesign document with a few missing links on some small thumbnails. Is there any way to embed pictures with already missing links? using ID CS5 Thanks

  • Error signing into V28 Folio Builder

    I recently updated to V28 of Folio Builder Panel, and I now cannot sign in with my account credentials. I have followed all the advise on the forum, uninstalled, reinstalled, deleted preferences etc, and I am still unable to sign in. The pop-up windo

  • BAPI_ACC_ACTIVITY_ALLOC_POST vs. ACC_ACT_ALLOC01

    Hello, I would like to use ACC_ACT_ALLOC01 IDOC for posting activities like in transaction KB21N. Problem is I can't find any Processing code for that in WE20? Is there any or should I made new processing code in WE42, which uses BAPI_ACC_ACTIVITY_AL