File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes display another record within db result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "display another record within db result set" Watch "display another record within db result set" New topic

display another record within db result set

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 833

I am storing articles in oracleXE db as clob. I want that after 10 lines or 250 words I may be able to show some pictures and videos related to this article.

I tried a lot by using the split() method by splitting the 250 words but result set shows all data and at the end pictures/videos appears. Any suggestions please

Best regards
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Your article is a combination of text and pictures. I can think of two approaches:
1) Store the article in multiple fields - clob for text, blob for images. Then add another column for "order" within an articleId.
2) Store the whole thing in a BLOB using some encoding for the text. Not sure how to do this as it seems like a hack.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: display another record within db result set
It's not a secret anymore!