• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

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

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??????
0
ferric77
Asked:
ferric77
1 Solution
 
karlikaCommented:
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?

Marko
0
 
ferric77Author Commented:
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.
0
 
CleanupPingCommented:
ferric77:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now