Forums Register Login

selecting more than one records in a single entity bean at a same time

+Pie Number of slices to send: Send
Hello Sir,

I got a remote object which is pointing to a single record at a time (Bean Managed Persistence). Now i have written a business method such as


public int Invoice_Count(int po_ID) throws Remote Exception
{
PreparedStatement pst = con.(query="select count(*) from apa_invoice
where po_id = ?");
ResultSet rs=pst.executeQuery();
return(Integer.parseInt(rs.getInt(1)));
}

Here i have code snippet only...
Now my question is whether the remote object which is currently pointing a single record can handle this type of query which is for a whole table. Whether this code will successfully execute or not.


Thanks
+Pie Number of slices to send: Send
why shouldn't it?

I do hope however that that's not all the code in your method, else you are in for some rude surprises.
It's exactly the same and completely different as this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 488 times.
Similar Threads
Overkill?
Composite primary key problem in Entity Bean
Lockable objects and client IDs
Weird number been put to DB table through JDBC
Design Review
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:06:43.