Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

about ResultSet

Status
Not open for further replies.

IPOz

Programmer
Jul 11, 2001
109
CN
Hi,friends
I heard that i should use Collection to package data returned to client side in EJB.But i think it is not effective to transfer ResultSet to Collection.

Is it possible to return ResultSet to client side directly.
If it is then why the petstore example uses Collection to package data?Beside portability are there any other advantage using Collection?

Any suggestions are appreciated!

Best Regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
No it's not possible to directly return ResultSet to the client. The ResultSet object might fetch the data one row after the other from the db and therefor does not already "contain" all the data after you executed the query.
The simplest solutions is the copy the result to a collection and pass it to the client.
 
Thanks for your response! I heard of CacheResultSet which conains all needed data.Anybody out there can give me details about using CacheResultSet ?

Thanks in advance! IPO_z@cmmail.com
Garbage in,Garbage out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top