Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Getting started with Dreamweaver and interMedia on 8i
This was difficult to find out...hope this helps someone.
Oracle interMedia can be linked to Macromedia Dreamweaver 2
The Macromedia plugin download is available on Oracle's site.
The configuration is quite difficult...
In Dreamweaver Commands menu, you need to choose Oracle8iConfig.
Database command: /intermedia/demo_agent/tabledump?ord_sql= Intermedia web command: /intermedia/demo_agent/mediaget/getmmbyid/
I created a DAD called demo_agent to look at the right part of the 8i database.
I had to write procedure getmmbyid to process images as:
(
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,
localImage ordsys.ordimage;
table_name VARCHAR2(30);
column_name VARCHAR2(30);
l_row_id ROWID; first_pos number;
begin
/*
ord_procedure_path = table_name_at_column_name_at_row_id e.g.
TEST_at_PICTURE@AAAD1gAACAAACNJAAA
*/
first_pos := INSTR(ord_procedure_path,'@');
second_pos := INSTR(ord_procedure_path,'@',first_pos+1);
table_name := SUBSTR(ord_procedure_path,1,first_pos-1);
column_name :=
SUBSTR(ord_procedure_path,first_pos+1,second_pos-first_pos-1);
l_row_id :=
chartorowid(SUBSTR(ord_procedure_path,second_pos+1,length(ord_procedure_path)-second_pos));
execute immediate
'select ' || column_name || ' from ' || table_name || ' where rowID = :placeholder_rowid '
INTO localImage USING l_row_id; -- l_row_id written to bind variableplaceholder_rowid
/*
/* * 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;
Hope this helps...
-- david rawle, technical director | e-mail: david.rawle_at_channel-a.com channel a, soho, london, uk | phone: +44 (0) 20 7287 6544 http://www.channel-a.com | fax: +44 (0) 20 7287 6554 (signature and public encryption key attached)Received on Wed Apr 19 2000 - 00:00:00 CDT