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 36182
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 2.7 32bit
operating system, and I use Sun Forte...
|
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 have tried to use the "long long" data type. However,...
|
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 been
serialized to a memorystream. The contents...
|
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 Corporation. All rights reserved.
I like to...
|
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 the data address and 2 additional scallar values.
...
|
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 closing tags of
<title>, <categoryand <link>....
|
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, and then use PERL Regular Expression to extract...
|
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 telling "OUT OF MEMORY". Any way with my collegues...
|
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 for example there may be a telephone number and an...
|
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 works.
import java.util.*;
import java.sql.*;...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |