Current Position:Home > How to print JPG image retrieved from BLOB in a table using Forms10g

How to print JPG image retrieved from BLOB in a table using Forms10g

Update:10-11Source: network consolidation
Advertisement
I create a database schema and a Form to maintain JPG to the table PHOTOS.
I would like to add a button to PRINT just the PHOTO_IMAGE to its maximum size from a Form. How can I do that? Is thaere any built-in Forms functions to do that? If the client is using Windows XP, can I use CLIENT_HOST() to call a program to print the JPG file directly?
Any suggestion is welcome.
-- myphotos.sql
drop user myphoto cascade;
create user myphoto identified by myphoto;
grant connect, resource, ctxapp to myphoto;
connect myphoto/[email protected];
PROMPT Creating Table USERS
CREATE TABLE USERS
(USER_ID VARCHAR2(8) NOT NULL,
USER_LASTNAME VARCHAR2(15) NOT NULL,
USER_FIRSTNAME VARCHAR2(30) NOT NULL,
USER_PASSWORD VARCHAR2(20) NOT NULL,
CONSTRAINT PK_USERS PRIMARY KEY (USER_ID)
PROMPT Creating Table PHOTOS
CREATE TABLE PHOTOS
(PHOTO_ID VARCHAR2(15) NOT NULL,
PHOTO_IMAGE BLOB,
TEXT_DESCRIPTION CLOB,
FILENAME VARCHAR2(50),
FILE_SIZE NUMBER NOT NULL,
USER_ID VARCHAR2(8) NOT NULL,
ACCESS_RIGHT VARCHAR2(7) NOT NULL,
CONSTRAINT CK_ACCESS_RIGHT CHECK (ACCESS_RIGHT IN ('PRIVATE', 'PUBLIC')),
CONSTRAINT PK_PHOTOS PRIMARY KEY (PHOTO_ID),
CONSTRAINT FK_USER_ID FOREIGN KEY (USER_ID) REFERENCES USERS (USER_ID)
create index idx_photos_text_desc on
PHOTOS(TEXT_DESCRIPTION) indextype is ctxsys.context;
INSERT INTO USERS VALUES ('G345566A','WONG', 'TAI SIN','WONGTAISIN');
INSERT INTO PHOTOS VALUES
('P00000000000001', empty_blob(), empty_clob(),
'SCGP1.JPG',100,'G345566A','PUBLIC');
INSERT INTO PHOTOS VALUES
('P00000000000002', empty_blob(), 'Cold Play with me at the concert in Melbourne 2005',
'COLDPLAY1.JPG',200,'G345566A','PUBLIC');
INSERT INTO PHOTOS VALUES
('P00000000000003', empty_blob(), 'My parents in Melbourne 2001',
'COLDPLAY1.JPG',200,'G345566A','PRIVATE');
COMMIT;
EXEC CTX_DDL.SYNC_INDEX('idx_photos_text_desc');
SELECT USER_ID,PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
ORDER BY USER_ID;
SELECT score(1),PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
WHERE CONTAINS(TEXT_DESCRIPTION,'parents',1)> 0
ORDER BY USER_ID,score(1) DESC;
SELECT USER_ID,score(1),PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
WHERE CONTAINS(TEXT_DESCRIPTION,'cold play',1)> 0
ORDER BY USER_ID,score(1) DESC;
SELECT USER_ID,score(1),score(2), PHOTO_ID ,TEXT_DESCRIPTION
FROM photos
WHERE ACCESS_RIGHT='PUBLIC'
AND CONTAINS(TEXT_DESCRIPTION,'Melbourne',1)> 0
AND CONTAINS(TEXT_DESCRIPTION,'2005',2)> 0
ORDER BY USER_ID,score(1) DESC;

The Best Answer

Advertisement
I use a third part product to do this (irfanview.exe).
This tool allows to do some batch operation /print to print the file)
Francois
  • How to print JPG image retrieved from BLOB in a table using Forms10g Update:10-11

    I create a database schema and a Form to maintain JPG to the table PHOTOS. I would like to add a button to PRINT just the PHOTO_IMAGE to its maximum size from a Form. How can I do that? Is thaere any built-in Forms functions to do that? If the client

  • Can you print the contents of a blob in Bi Publisher Update:10-11

    For example, Bi Publisher generate a pdf file in apex that will print the contents of a blob. Let's say you have a record with test.xls in a blob, can I take the test.xls out of the record and have bi publisher print it. Thanks, DougBI Publisher can

  • Downloading BLOB from a table. Update:10-11

    Hello, First I want to say thatnks for such a great tool like HTMLDB. Question is: How do I download BLOB from a table. What I am trying to do is. I am uploading files to a default HTMLDB location (wwv_flow_file_objects$) and moving the records to di

  • Retrieving Multiple Values from a table Update:10-11

    Dear Experts, Can anyone let me know how to retrieve multiple rows from a table using Oracle BPEL Database Adapter and assign it to a output variable? Regards, Pradeep.If the input XML Record is as follows Input xmlRecord: <EmployeeCollection> <E

  • Retrieve values from a HTML table !!! Update:10-11

    Hi. How can i retrieve values from a HTML table using javascript ? I´m trying to use the command "document.getElementsByTagName" without success. Thanks in advance. EduardoHi, Deepu. I´m still with trouble in retrieving the value in HTML. In deb

  • How to retrieve 2 values from a table in a LOV Update:10-11

    Hi I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY I want to display NAME to the user in a list. When the user select an item from the list, I want to retr

  • How to retrieve the values from a table if they differ in Unit of Measure Update:10-11

    How to retrieve the values from a table if they differ in Unit of Measure?If no data is read - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/

  • Unable to retrieve nametab info for logic table BSEG during Database Export Update:10-11

    Hi, Our aim is to Migrate to New hardware and do the Database Export of the existing System(Unicode) and Import the same in the new Hardware I am doing Database Export on SAP 4.7 SR1,HP-UX ,Oracle 9i(Unicode System) and during Database Export "Post L

  • Crystal Report error trying to retrieve data from a user table Update:10-11

    Hi, I'm making crystal report application with VS 2005 and I need to retrieve data form a user table. I'm using Pull method, I configure the connection and parameters by code. I think that the problem could be the @ that is used to identify these tab

  • Retrieve data from a large table from ORACLE 10g Update:10-11

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive. The problem here is that I am not able to connect to the database directly because