|
|
|
|
|
|
|
|
|
|
Re: File Store and Copy in Directory [message #637220 is a reply to message #637218] |
Wed, 13 May 2015 04:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/68b0ba068684db8e6bf035f30bbd40d5?s=64&d=mm&r=g) |
mehboob110233
Messages: 55 Registered: February 2014 Location: Pakistan
|
Member |
![mahboob30699@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
DECLARE
V_COUNT NUMBER(2);
V_DOC_TYPE VARCHAR2(10);
BEGIN
GO_BLOCK('RELEASE_MANAGEMENT');
FIRST_RECORD;
LOOP
IF :RELEASE_MANAGEMENT.ACTIVE='Y' THEN
V_DOC_TYPE:=SUBSTR(:RELEASE_MANAGEMENT.OBJECT_PATH,(INSTR(:RELEASE_MANAGEMENT.OBJECT_PATH, '\'))+1, 10);
IF V_DOC_TYPE='FORMS\' THEN
:RELEASE_MANAGEMENT.DOC_TYPE:='FMX';
ELSIF V_DOC_TYPE='REPORTS\' THEN
:RELEASE_MANAGEMENT.DOC_TYPE:='RDF';
END IF;
:CONTROL.FILE_SOURCE_PATH := '\\VMWLSWD\DEVCOM\' ||
:RELEASE_MANAGEMENT.OBJECT_PATH ||
:RELEASE_MANAGEMENT.OBJECT_NAME||'.'||:RELEASE_MANAGEMENT.DOC_TYPE;
PKG_FILE.UPDATE_DB_FILE(:OBJECT_CODE);
[color=deeppink] CLIENT_IMAGE.WRITE_IMAGE_FILE('D:\MEHBOOB\'||:RELEASE_MANAGEMENT.OBJECT_NAME||'.'||:RELEASE_MANAGEMENT.DOC_TYPE, [/color]:RELEASE_MANAGEMENT.DOC_TYPE,'RELEASE_MANAGEMENT.ATTACHED_FILE', 0,0);
-- client_image.write_image_file(vfilename,'','COMPANY_INFO_MST.CIM_LOGO');
--
END IF;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
END LOOP;
END;
This is my code first i upload file in database now i want to copy that file in any directory
i use color line for that
|
|
|
|
|
Re: File Store and Copy in Directory [message #639840 is a reply to message #639807] |
Fri, 17 July 2015 10:51 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/6f539f43889b4b3e3fcb6c591073de8f?s=64&d=mm&r=g) |
CraigB
Messages: 386 Registered: August 2014 Location: Utah, USA
|
Senior Member |
|
|
You're not following Michael's suggestion!
Quote:CLIENT_IMAGE.WRITE_IMAGE_FILE('D:\MEHBOOB\'||:RELEASE_MANAGEMENT.OBJECT_NAME,'FMX','RELEASE_MANAGEMENT.ATTACHED_FILE', 0,0);
this package work properly when story image file like JPEG, when i use 'FMX' file this not work.
Why are you surprised this doesn't work? WRITE_IMAGE_FILE is for writing compatible IMAGE files not any type of BINARY file.
Is "D:\mehboob110" a directory on your computer or on the Database server computer? If it is a directory on your computer, you can use the WebUtil_File.DB_TO_CLIENT function to transfer the file from the database to the directory on your computer.
If the directory is on the Database server, then you need to use Michel's suggestion of creating a DIRECTORY object in the database and then use the database package UTL_FILE to write the file form your table to the server directory.
As Michel stated, we're not going to write the code for you but we'll happily help you fix your code. ![Smile](images/smiley_icons/icon_smile.gif)
Craig...
|
|
|