Solved

HOW to display BLOB (.pdf files)

Posted on 2004-08-26
4
3,029 Views
Last Modified: 2011-04-14
HI ,

I am having a problem with displaying pdf files which stored in the oracle database as BLOBs
i have a table which has a blob column and i save all .pdf , .doc , .xml , .txt files as BLOBs. and i use oracle text to do the content searching and display the results in a web browser. When some one insert a query(to search keyword) , it will search the blob column and display matching documents. when someone click one document i want to display the document.

my idea was when the ,first when some one insert a query ,it will starts a searching and return the document id's, and document names first and when some one select a specific document using document id get the related document. (that is if some one click a .pdf file i want to display the pdf file in the browser.)

i am using JSP and servlet for web client.

can some pls tell me how to  get pdf file out of blob object and diplay it in the browser.

thanx.
0
Comment
Question by:sasankad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 11902595
I found this for PHP (STFW):
http://forums.oracle.com/forums/thread.jsp?forum=178&thread=233174&message=&tstart=45&trange=15706898

Hope this gives you already some ideas...
0
 

Author Comment

by:sasankad
ID: 11909401
HI

angel thanx for ur reply.

but in that site they have shown how to insert pdf file in to BLOB in the database. I have already done that part. The question is displaying it. because i first display the search result based on the keyword (or searching query) and then display the relevant .pdf or .doc after clicking one of those results.

regards.
      sasanka
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 11910107
Yes, the question is about how to store it, but there is also some code to display it:

// Now query the uploaded BLOB and display it
  $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = '.MYBLOBID;
 ...
0
 

Author Comment

by:sasankad
ID: 11960981
thanx angel III

it helped me a lot...
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question