HI!
I have a binary data stored in a LONG RAW column in an Oracle table. The Binary data contains .pdf document. Can anybody please help me to write a function/SP which extracts that Binary data back to pdf document or to a text file?
Any help would be highly appreciated.
Thanks in Advance!!!
9 35788
HI!
I have a binary data stored in a LONG RAW column in an Oracle table. The Binary data contains .pdf document. Can anybody please help me to write a function/SP which extracts that Binary data back to pdf document or to a text file?
Any help would be highly appreciated.
Thanks in Advance!!!
Make use of RAWTOCHAR to convert the RAW data to character type
Make use of RAWTOCHAR to convert the RAW data to character type
Check below functions: -
FUNCTION chartoraw(v_char varchar2) return long raw
-
is
-
rawdata long raw;
-
rawlen number;
-
hex varchar2(32760);
-
i number;
-
begin
-
rawlen := length(v_char);
-
i := 1;
-
while i <= rawlen
-
loop
-
hex := numtohex(ascii(substrb(v_char,i,1)));
-
rawdata := rawdata || HEXTORAW(hex);
-
i := i + 1;
-
end loop;
-
-
return rawdata;
-
end;
-
-
-
FUNCTION rawtochar(v_raw long raw) return varchar2
-
is
-
rawlen number;
-
hex varchar2(32760);
-
rawparam varchar2(32760);
-
i number;
-
begin
-
hex := rawtohex(v_raw);
-
rawlen := length(hex);
-
i := 1;
-
while i <= rawlen
-
loop
-
rawparam := rawparam||CHR(HEXTONUM(substrb(hex,i,2)));
-
i := i + 2;
-
end loop;
-
-
return rawparam;
-
end;
-
-
Check below functions: -
FUNCTION chartoraw(v_char varchar2) return long raw
-
is
-
rawdata long raw;
-
rawlen number;
-
hex varchar2(32760);
-
i number;
-
begin
-
rawlen := length(v_char);
-
i := 1;
-
while i <= rawlen
-
loop
-
hex := numtohex(ascii(substrb(v_char,i,1)));
-
rawdata := rawdata || HEXTORAW(hex);
-
i := i + 1;
-
end loop;
-
-
return rawdata;
-
end;
-
-
-
FUNCTION rawtochar(v_raw long raw) return varchar2
-
is
-
rawlen number;
-
hex varchar2(32760);
-
rawparam varchar2(32760);
-
i number;
-
begin
-
hex := rawtohex(v_raw);
-
rawlen := length(hex);
-
i := 1;
-
while i <= rawlen
-
loop
-
rawparam := rawparam||CHR(HEXTONUM(substrb(hex,i,2)));
-
i := i + 2;
-
end loop;
-
-
return rawparam;
-
end;
-
-
Hi!
I hope you didn't understood me correctly. Let me explain you once more, I have actually loaded the binary data (.pdf file) to an Oracle 10g database table's LONG RAW column. Now, I want to extract that LONG RAW column containing (pdf file) and write another pdf file. Then I will compare the file which is generated now and the pdf file which I have loaded to verify my load.
So, for that I need a pl/sql function-SP. If not possible via Pl/Sql you experts can provide me a Java, .Net code to extract that pdf file.
(Currently this LONG RAW column stores pdf file but later on it can store other Binary data as well)
Thanks In Advance.!!
Hi!
I hope you didn't understood me correctly. Let me explain you once more, I have actually loaded the binary data (.pdf file) to an Oracle 10g database table's LONG RAW column. Now, I want to extract that LONG RAW column containing (pdf file) and write another pdf file. Then I will compare the file which is generated now and the pdf file which I have loaded to verify my load.
So, for that I need a pl/sql function-SP. If not possible via Pl/Sql you experts can provide me a Java, .Net code to extract that pdf file.
(Currently this LONG RAW column stores pdf file but later on it can store other Binary data as well)
Thanks In Advance.!!
In order to create a PDF from oracle data, you can check here
What you could do is get the binary RAW data, convert it to char, then write it to new pdf using logic as shown in the above link
In order to create a PDF from oracle data, you can check here
What you could do is get the binary RAW data, convert it to char, then write it to new pdf using logic as shown in the above link
It dosen't required to answer everytime, atleast "NOT" if you haven't understood the question correctly.
What am I asking is A and you are replying me Z...
Thanks anyways!!!
It dosen't required to answer everytime, atleast "NOT" if you haven't understood the question correctly.
What am I asking is A and you are replying me Z...
Thanks anyways!!!
We are here to provide different kind of solutions to a problem or a path way so that you could proceed further. Dont expect exact solutions every time. If you feel you are not getting satisfied answer, then you can google it out your self!!
We are here to provide different kind of solutions to a problem or a path way so that you could proceed further. Dont expect exact solutions every time. If you feel you are not getting satisfied answer, then you can google it out your self!!
That's what I am doing Mr. Patel.
I am simply looking for an answer that .. How we can extract the Binary Data which is stored in LONG RAW column of a Oracle table.
Now, if you will provide me the solution that how we can change the character based data to pdf..Then after sometime I will ask you .. How to get an image file extracted from a Binary stored data.
I am not questioning you knowledge and expertise. What i said was, an humble and polite request you not to hop into to provide the opening to solution. Please try to figure out what members are trying to ask and try to provide the balanced solution..
And we member post question and reply to answers because we know that these things we cannot found over google. We post only after doing that with proper problem and expecting a proper answer (which sombody other might have faced and solved)
Thanks
Hi laconicamit
If you know how to use Visual Basic 6.0
Try to use AppendChunk and GetChunk method of recordset object of ADO
for storing and retriving files from LONG RAW column in Oracle.
Hi laconicamit
If you know how to use Visual Basic 6.0
Try to use AppendChunk and GetChunk method of recordset object of ADO
for storing and retriving files from LONG RAW column in Oracle.
Thanks Sir,
Let me check and get back to you..
Many Thanks.. :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: music4 |
last post by:
Greetings,
I need to use a long long data type integer in my program, but how to print
it with printf() or an alternative? My platform is Solaris...
|
by: dijaster |
last post by:
Recently I have had the need to run loops of at least 10^10 steps.
Since 32 bit integers apparently can only store values up to about
2*10^9, I...
|
by: Neil West |
last post by:
I’m trying to drag & drop listview items between two instances of my app. The
actual data that’s passed in DoDragDrop is an arraylist that’s...
|
by: wenmang |
last post by:
Hi,
I am using following Oracle Proc-C compiler:
Pro*C/C++: Release 8.1.7.0.0 - Production on Thu Jun 15 15:57:32 2006
(c) Copyright 2000 Oracle...
|
by: D Kon |
last post by:
Hi,
I have built a VC++.NET dll function in which you pass an array of double data and 2 additional input arguments and it returns a pointer of...
|
by: caine |
last post by:
I want to extract web data from a news feed page
http://everling.nierchi.net/mmubulletins.php.
Just want to extract necessary info between open n...
|
by: maverickx |
last post by:
Hi everyone,
this is about my one project, i was planning to do like this: Firstly i printed out the source code of one html page on the DOS window,...
|
by: sivadhanekula |
last post by:
Hi everyone,
I have a problem with my Mysql data. I have 2,95,67,456 lines of data which is too much and if I run this in MYSQL front-end it is...
|
by: code green |
last post by:
I have a text field called notes in which users have typed almost anything they like.
I need to find numeric data randomly inserted in there.
So...
|
by: Shun |
last post by:
Hello, I am trying to extract the data from my Oracle 10g database using Java.
First, I tried to connect Oracle to Java using this code and it...
|
by: tammygombez |
last post by:
Hey fellow JavaFX developers,
I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
|
by: tammygombez |
last post by:
Hey everyone!
I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: CD Tom |
last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |