Solved

HOW to display BLOB (.pdf files)

Posted on 2004-08-26
4
2,830 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
  • 2
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
Comment Utility
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
Comment Utility
thanx angel III

it helped me a lot...
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
frontend queries vanishing 3 54
sql query help 7 82
Change variables in SQL table 6 65
Pivot not using aggregate yield error 3 13
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Creating and Managing Databases with phpMyAdmin in cPanel.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now