DB2 and WSAD problem........................

Posted on 2003-03-06
Medium Priority
Last Modified: 2010-08-05
i have a table to stores file which user uploaded from a servlet. and i built it using WSAD v5. BD2 v8.
i have this bean call Filetable. which has CMP fileds
java.lang.String fileid,
byte [] files,
java.lang.String filename

in DB2
fileid VARCHAR(10),
files BLOB(10M),
filename VARCHAR(20),

i got no problem in uploading or downloading any files....
i simply use the accessor and mutator function the generated by WSAD.

the problem is i cant generate the findAll() using EJBQL.
because of the different type mapping of 'files'. But i need to display all the fileid and filename.... so how should i go with it??????
Question by:ferric77
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

Accepted Solution

karlika earned 150 total points
ID: 8087240
Just to get this right:
You upload the files to the server, store them in the DB2 and now you have problems listing those entries?
Why not using SQL instead of EJBQL? You will have to rebuild the Beans after retrieving the content from the DB but that should not cause any Problems.

Or do you have problems storing those Beans through EJBQL?
Can you provide some more details?


Author Comment

ID: 8100037
i have no problem in storing data through this bean, and no problem in retrieving single row of data from the db

the problem is that i want to display the fileid and the filename. and the user can click on the link to retrieve the file.

as i am not a hardcore java programmer. i depend on the Websphere Application developer to make the DB connection and program generated codes to retrieve data.

When i used the build in EJBQL fucntion in the WSAD. i got an error says that i cant generate EJBQL, because of the type mapping from "BLOB to byte[]". And i have no problem of doing this with other beans. as they all have the correct datatype mapping.

Expert Comment

ID: 9058870
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 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